Template Question

Hi,

I would like to create a template, where it only displays if there is text in the column? How can I set that up?

Thank you!!

dinein1

Create first an IF THEN column. If To-Go is NOT EMPTY, then To-Go, else empty. Then use that If Then in your template column.

1 Like

Like this?

1 Like

Ahh! Think I got it! Thank you!
How do I get rid of the ‘&’ if both do not apply?

Set it up as well in an IF THEN.
IF To-Go is not empty, and IF Dine-In is not empty, then &. And you use it in your template column

Not sure I get you.

Create a new IF THEN column. We’re looking for 2 IF conditions,

  1. If To-Go is not empty,
  2. If Dine-In is not empty,

Then, &

Else, empty.

Then, in your current template column, instead of the &, you just replace that value with the new if then column we created above. That way, you bring the & to the template column only when the restaurant has dine in and to do.

1 Like

Ok! This?

1 Like

The & symbol is still showing up.

if3

Does anyone have a solution to get rid of the & symbol?

Here is one way to do it:

Define 2 template columns, here I’ve called them “Template Single” and “Template Both”

The configuration for Template Single:

The configuration for Template Both:

Then in your layout, add components for both templates, but use visibility conditions to control which one appears.

For single:

Screen Shot 2020-11-09 at 12.47.00 PM

And for both:

Screen Shot 2020-11-09 at 12.47.15 PM

2 Likes

Oh I love this!! Thing is, this is for an image TAG, so I can only use one template. :frowning:

You should still be able to use it.
Add the image twice, and use the same visibility conditions to control which appears.

1 Like

This portion is more than an image, its a card layout, with header, title and details.

Okay, but the same still applies.
You can add the component twice.
In one instance of the component you use Template Single as the image tag, and in the second instance you use Template Both. And then again, you use the visibility conditions to control which appears.
That should work, no?

(PS. There is probably a better way to do this, and I am by no means an expert. This is just the first way that occurred to me)

1 Like

Thank you!

I don’t think it will work, since this is under the ‘see more’ text. So it’s all under one component.

Okay.
Are you able to share your app and allow me to copy it?
If I can see all this in context then maybe I can help you find a solution.

Let’s not make this too complicated. I think we can do it like this.

Dine-in ITE: If Dine-in is not empty then 1, else 0.

To-Go ITE: If To-go is not empty then 2, else 0.

Condition Sum: Dine-in ITE + To-Go ITE

Final Display: If Condition Sum (CS) = 3 then Dine-in & To-Go, if CS = 2 then To-Go, if CS = 1 then Dine-in, else empty.

2 Likes

Thank you Thinh! Where do I find condition sum?

And Final Display?

You create those in your data, condition sum is a math column, final display is If Then Else.