I know this sound basic and actually I found many topics about this but seems I still cannot make it works.
I'm a newbie in PowerApps, and now I just want to have my DataCard in my Browse Gallery to have a certain color based on a value.
How exactly and where I should put the expression ?
So I have a BrowseGallery which contains DataCard, and lets say the DataCard I want to change its color is DataCardValue11. The column underlying it, is the Active column (which is an two options set).
Currently, I did,
1. Unlock the specified DataCard
2. Go to Properties and Tab Advanced
3. Locate "Color"
4. Then add the expression, like this : If (Value(DataCardValue11.Text) = "Active", Green, Red)
There is an warning sign saying it is incompatible type. Is OptionSet need special care and cannot just put the text "Active" like that ?
Please if anyone can give some clue or idea or anything I should check. I thought the conditional format to make the font color red/green based on some value would be easy. Never thought would be this difficult. 🙄
Point to make is :
1. I have a table / entity in CDS
2. Along with my custom / newly added fields, this CDS has column / fields Status (which is a standard field every time we create entity, so the data type and all should be standard I supposed)
3. In PowerApps, I create a Browse Gallery to this table from a template. So, as normal (since it is from template) it will have browse screen and Edit screen and in the Edit screen, does this Status field appeared.
4. I just want this Status, whenever it says "Active", rather than normal "black", the font is Red,
If it is hard because probably difficult to know what I already did, can anyone advice some example how to achieve those point instead, so I can just do it from the scratch again.
Thanks in advance.
Hi, Im having the same issue with an option set value field.
The problem is that we shoud be referencing the id of the option but, apparently there is no way to that. I´veposted the same question in another comentary, lets see if anyone can solve that.
Hello! I just found the way to do it while working. Only 3 hours for this little issue.
For the formula you have to go as follows:
If(status= 'status options'.Active; red)
The point is that you have to difference between the name of the field, and option set name, which I advise to change adding 'options' so you can disitnguise while doing the formula.
Hope this works for you.
Check out new user group experience and if you are a leader please create your group
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.