Notifications
Announcements
Hello,
Might be a silly question, but my goal here is to fill a dot based on what choice is in datacard.
Idea is : orange = if pending, green = if approved, red = if declined.
Somehow I cant make it work.
Heya, I think you just have an extra comma at the end of your formula after the last White, remove that comma and it should work 🙂
Actually, I think you can remove all of those White values except the last one, like this:
If( DataCardValue49.Selected.Value = "Pending", Orange, DataCardValue49.Selected.Value = "Approved", Green, DataCardValue49.Selected.Value = "Declined", Red, White )
Hi,
Try this:
As @iAm_ManCat said, you have an extra comma threre at the end.
You could also use a Switch in this case:Switch(DataCardValue49.Selected.Value, "Pending", Orange, "Approved", Green,"Declined",Red,White)
Hi @iAm_ManCat ,
Are you confident in using this "simplified" if statement? I still use nested IFs.
Yes absolutely - this isn't a simplified statement, its how If's are meant to be used:
If( logic1, answer1, //else if logic2, answer2, //else if logic3, answer3, //else answer4 )
The nested if is actually less performant and can lead to performance impacts in larger nested ifs.
This is why love the community, learning opportunities are just around the corner. Thanks @iAm_ManCat
Totally agree and glad to help!
#SharingIsCaring
Hello all,
Sorry I had a day off on Friday. Unfortunately non of these are working. 😞 Using IF or SWITCH the color is returning white even when selected...
Ah.. never mind! Added new Valuecard with 3rd approval and the two previous dots started working.. 😄
So both IF and Switch are working! Thank you so much! You saved me! 🙂
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 721 Most Valuable Professional
Michael E. Gernaey 320 Super User 2025 Season 2
Power Platform 1919 268