In the screenshot you can see 3 items. 1 is Approved, 1 Rejected and 1 Conditional.
I want the fill for each item to change based on that Status Field. Status is the DataCardValue18 in the code below.
Here is my fill property - Switch(DataCardValue18.Selected.Value,"Approved",RGBA(127, 178, 57, 1),Switch(DataCardValue18.Selected.Value,"Rejected",RGBA( 255, 0, 0, 1 ),RGBA(255, 140, 0, 1)))
I've tried "If" as well but same result. Now if I click on one that says Rejected (should be Red Fill), when I come back from its details to the browser screen (as shown) they will all then turn Red.
Help appreciated. Thx
Solved! Go to Solution.
I just tested and confirmed on my end that it only changes once selected using the background referencing the label and that using ThisItem. no longer works for rows... very interesting!
Ok, so workaround for this would be to create a label in the background (note its layered position in the gallery on the left), and then have it's fill based on that same formula - tested this and it works:
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @Taylope1
Try
Switch(DataCardValue18.Selected.Value,"Approved",RGBA(127, 178, 57, 1),"Rejected",RGBA( 255, 0, 0, 1 ),RGBA(255, 140, 0, 1))
Also add a label on screen and set its Text property to DataCardValue18.Selected.Value to ensure it is returning the correct value.
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
Thanks for that. The Light green words (rejected etc) are a label showing the values, so already going that. Made you change but still does the same. Also, as before once i select a rejected item, they all go red, select an approved one, they all change to green. ????
Hi,
Two reasons I can think of for this:
One -
Do you need to use a dropdown for those items? Are you going to be changing its value on this same screen?
If its from the same list then just use ThisItem.Status.Value in a label rather than a dropdown/combobox
Otherwise:
Two -
When using a gallery, you need to reference an item within a row rather than the control itself if you want to defer to each row's value:
Switch(
ThisItem.Status,
"Approved", RGBA(127, 178, 57, 1),
"Rejected", RGBA( 255, 0, 0, 1 ),
RGBA(255, 140, 0, 1)
)
If this is a choice column, then we need to use the .value :
Switch(
ThisItem.Status.Value,
"Approved", RGBA(127, 178, 57, 1),
"Rejected", RGBA( 255, 0, 0, 1 ),
RGBA(255, 140, 0, 1)
)
Hope this helps in some way, I'm not certain its the answer but its all I could think of apart from what Reza already covered,
Cheers,
Sanho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
So attached is a grab of my App - I have created a label that points to ThisItem.Status.Value. This shows the correct value against each item - no issues. I changed the Fill value as you suggested (as this is a choice column in my Sharepoint List - but it wont need to be edited here) - then i get a black screen and a message basically stating unable to use ThisItem.Status.Value in the formula (as per second attachment).??
I just tested and confirmed on my end that it only changes once selected using the background referencing the label and that using ThisItem. no longer works for rows... very interesting!
Ok, so workaround for this would be to create a label in the background (note its layered position in the gallery on the left), and then have it's fill based on that same formula - tested this and it works:
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
All working now. Layering worked a treat. Many Thanks
User | Count |
---|---|
258 | |
110 | |
97 | |
52 | |
39 |