47
Views
8
Comments
Solved
Content/Tag
Question

How I can use three conditions in one content/tag?

I have an entity static with three attributes and I want to show different colors for each one of them.

But, I'm not able to do it.


If (GetRequests.List.Current.Priority.Id = Entities.Priority.High,Entities.Color.Red, Entities.Color.Orange)


I don't know-how include a color for priority.low for example.

Can you help me, please?

Tks

Rank: #207
Solution

samiravolpe wrote:

How I can use three conditions in one content/tag?

I have an entity static with three attributes and I want to show different colors for each one of them.

But, I'm not able to do it.


If (GetRequests.List.Current.Priority.Id = Entities.Priority.High,Entities.Color.Red, Entities.Color.Orange)


I don't know-how include a color for priority.low for example.

Can you help me, please?

Tks

Hi Samira, you can use an IF inside IF like that:

If (GetRequests.List.Current.Priority.Id = Entities.Priority.High, Entities.Color.Red, IF(GetRequests.List.Current.Priority.Id = Entities.Priority.Low, Entities.Color.Orange, Entities.Color.Green))

Hi,

you can do something like this, with ButtonGroup:

Let me know if you understand

Rank: #207
Solution

samiravolpe wrote:

How I can use three conditions in one content/tag?

I have an entity static with three attributes and I want to show different colors for each one of them.

But, I'm not able to do it.


If (GetRequests.List.Current.Priority.Id = Entities.Priority.High,Entities.Color.Red, Entities.Color.Orange)


I don't know-how include a color for priority.low for example.

Can you help me, please?

Tks

Hi Samira, you can use an IF inside IF like that:

If (GetRequests.List.Current.Priority.Id = Entities.Priority.High, Entities.Color.Red, IF(GetRequests.List.Current.Priority.Id = Entities.Priority.Low, Entities.Color.Orange, Entities.Color.Green))

Rank: #383

Hi, friend!

I already used this solution in 2 different projects.

Put the content you want to give the color inside a container and name it. I will call it [ ColorContainer ].

In the [ ColorContainer ], set the Extended Properties to style passing the value returned from the static entity, like the image below:

style

"backgroung-color: " + Entities.Color.Red + ";"

That way, you don't need to change the CSS page.

I hope it helps you.


Best Regards.


Rank: #6809

Thanks, guys.

It's working!


I forgot to put other brackets at the end of the expression.

I'm a beginner! ;)

mvp_badge
MVP
Rank: #91

Hi Samiravolpe,

You have to define an conditional expression on the Content\Tag widget Color property as mentioned below:



Conditional Expression

If (LocalToDo.PriorityId = Entities.Priority.High, Entities.Color.Red, If(LocalToDo.PriorityId = Entities.Priority.Medium, Entities.Color.Orange, Entities.Color.Green))


For your case you have to change the above mentioned conditional Expression

LocalToDo.PriorityId ----> GetRequests.List.Current.Priority.Id


In my case I created a Block for defining a List Items as mentioned below: 

And instantiated the Block within the Parent Screen List Widget as mentioned below and passed the current record of the item as input parameter to the Block:

Output in browser:


Hope this helps you!

Let me know if you need any more help.


Regards,

Benjith Sam