cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AlbertoSP
Level: Powered On

RE: Insert Icons into a DataCard

Hi,

I have 2 icons icn_Approve and icn_Decline.
How can an icon be inserted into a DataVard or a lable based on the condition of a Status field?

For Example,
When the form loads and, if Status = "Approved," the DataCard wil dispaly icn_approve.
I could overlay the icons in the DataCard ontop of eachother and set condtions on Visible for each, but looking for a cleaner way.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: RE: Insert Icons into a DataCard

Hi @AlbertoSP ,

Do you want to insert a Icon button into a Data card in your Edit form?

 

If you want to insert a Icon button into a Data card in your Edit form, you need to unlock the corresponding Data card firstly. Then select the Data card, insert your two icons.

 

I have made a test on my side, please check the following GIF screenshot:

Test.gif

Within the Data card, you could control the icn_Approve and icn_Decline's visibility based on the Status column value using the following formula:

Set the Visible property of the icn_Approve to following:

If(ThisItem.Status = "Approved", true, false)

Set the Visible property of the  icn_Decline to following:

If(ThisItem.Status = "Declined", true, false)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: RE: Insert Icons into a DataCard

If you use the Icon control you can now change the icon that is displayed based on the Icon property (this was added about a month ago):

ChangingIcon.gif

If you are using an Image control (and icn_Approve and icn_Decline are images that you added to your app), then you can use a similar logic in the Image property of the control.

Community Support Team
Community Support Team

Re: RE: Insert Icons into a DataCard

Hi @AlbertoSP ,

Do you want to insert a Icon button into a Data card in your Edit form?

 

If you want to insert a Icon button into a Data card in your Edit form, you need to unlock the corresponding Data card firstly. Then select the Data card, insert your two icons.

 

I have made a test on my side, please check the following GIF screenshot:

Test.gif

Within the Data card, you could control the icn_Approve and icn_Decline's visibility based on the Status column value using the following formula:

Set the Visible property of the icn_Approve to following:

If(ThisItem.Status = "Approved", true, false)

Set the Visible property of the  icn_Decline to following:

If(ThisItem.Status = "Declined", true, false)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlbertoSP
Level: Powered On

Re: RE: Insert Icons into a DataCard

Thanks, I'm going to use your solution.
Previously I inserted an html action and diaplyed images of icons based on a conditions 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 51 members 4,280 guests
Please welcome our newest community members: