cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Highlighted
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.

Highlighted
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