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

Show icon on value

I'm trying to show a checkmark or a cross on my user page if the user is approved/not approved.

Like here:

 Visible.PNG

I'm trying to use the "Visible" box with the following code

 

If(DataCardValue26 = "true",true,false)

The datacardvalue26 contains the data true/false.

 

But this is not working for me. I'm getting an error on the = part of the code. But I don't know what I'm doing wrong.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Show icon on value

Hi @Frello ,

Could you please share a bit more about your scenario?

Do you want to display a Checkmark within the gallery item when the corresponding user has been approved, otherwise, display a corss within the Gallery item?

Further, which column does the DataCardValue26 connect to in your data source? Which column do you use to identify if the user has been approved in your data source?

 

I assueme that you use a Text type column (Called "IsApproved") in your data source to identify if the user has been approved.

Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

Within your Gallery control, add a Checkmark icon and a Cross Icon. Set the Visible property of the Checkmark icon to following:

If(
ThisItem.IsApproved="true",
true,
false
)

Set the Visible property of the Cross icon to following:

If(
ThisItem.IsApproved= "true",
false,
true
)

Note: The IsApproved represents the Text type column in your data source, which used to identify if the user has been approved. I assume that the true value in your Gallery is bound to ThisItem.IsApproved formula.

 

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.

View solution in original post

7 REPLIES 7
xzDan
Level 8

Re: Show icon on value

Can you try

DataCardValue26.Value=true

or

DataCardValue26=true

Unless DataCardValue26 is a text-type, where you write "true" in it?

Then try

DataCardValue26.Value="true" 

or

DataCardValue26.Text="true"

 

Frello
Level: Powered On

Re: Show icon on value

@xzDan 

DataCardValue26.Text="true"

That is working.

 

Except I probably am doing something wrong.

 

Visible1.PNG

 

It's showing an X for all of the users now, I want to show it per user. What am I doing wrong ?

 

I thought by adding the icons to my gallery it would pick it per user?

 

Visible2.PNG

 

 

 

 

xzDan
Level 8

Re: Show icon on value

So you are wanting to show the X for those with true only?

Is it Title6 that is the 'true' bit, and NotApproved the X icon? So Not Approved's Visible should be Title6.text="true" ?

Highlighted
Frello
Level: Powered On

Re: Show icon on value

@xzDan 

 

I want to show an X if the user is not approved.

 

I don't want to show the title in the picture. I just used it to check if the icons showup.

xzDan
Level 8

Re: Show icon on value

What is the text saying 'true' and 'false' in the gallery? And what is its text set to?

Community Support Team
Community Support Team

Re: Show icon on value

Hi @Frello ,

Could you please share a bit more about your scenario?

Do you want to display a Checkmark within the gallery item when the corresponding user has been approved, otherwise, display a corss within the Gallery item?

Further, which column does the DataCardValue26 connect to in your data source? Which column do you use to identify if the user has been approved in your data source?

 

I assueme that you use a Text type column (Called "IsApproved") in your data source to identify if the user has been approved.

Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

Within your Gallery control, add a Checkmark icon and a Cross Icon. Set the Visible property of the Checkmark icon to following:

If(
ThisItem.IsApproved="true",
true,
false
)

Set the Visible property of the Cross icon to following:

If(
ThisItem.IsApproved= "true",
false,
true
)

Note: The IsApproved represents the Text type column in your data source, which used to identify if the user has been approved. I assume that the true value in your Gallery is bound to ThisItem.IsApproved formula.

 

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.

View solution in original post

Frello
Level: Powered On

Re: Show icon on value

@v-xida-msft I'm sorry for the late response.

 

Thanks for the detailed explanation, your code works for me and got the icons displaying correctly now! 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 272 members 5,473 guests
Please welcome our newest community members: