cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

How to display button as a function of User credentials

Hi,

 

I have a view form with an edit button redirecting towards an edit form,

 

I want this button to show only if the "Domaine" value of the user list is the same as the "Equipe Principale" datacard value of the view form (link to another list in SharePoint),

 

I tried this formula on the visible property of the button :

If(Domaine.Text = DataCardValue2_1.SearchText,true,false)

 

This formula doesn't seem to work,

 

I have put screenshots of my app and list in attachments, 

 

Thanks for helping,

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Impactful Individual
Impactful Individual

Hi @Anonymous 

What kind of control is this Datacardvalue? Is it a text input? A combobox?

It depends on what it is. In case of text input you use 'DataCardValue2_1.Text', in case of combobox you use DataCardValue2_1.Selected.Text

 

View solution in original post

8 REPLIES 8
Highlighted
Resolver I
Resolver I

Hi,

 

Try this If(DataCardValue2_1.Text ="Equipe Principale" ,true,false)

 

Hope it will help. 

Highlighted
Impactful Individual
Impactful Individual

Hi @Anonymous ,

I think you just have to use next:

If(Domaine.Text = DataCardValue2_1.Text, true, false)

 

Highlighted
Anonymous
Not applicable

Thanks for your answer SkidK but I have tried this and it return me an error (see attachment)

Highlighted
Anonymous
Not applicable

Hi VDS , your formula will not work "Equipe Principale" is the label of the datacard, I want to check if the value of this same datacard is equal to the User's Domaine .

Highlighted
Impactful Individual
Impactful Individual

Hi @Anonymous 

What kind of control is this Datacardvalue? Is it a text input? A combobox?

It depends on what it is. In case of text input you use 'DataCardValue2_1.Text', in case of combobox you use DataCardValue2_1.Selected.Text

 

View solution in original post

Highlighted
Regular Visitor

Hi,

 

please try If(DataCardValue2_1.SearchText in Domaine.Text ,true,false) I've run into simmilar issues a couple of times and this always worked for some reason, even though there is no obvious reason for me as to why.

 

Sergiu

Highlighted
Anonymous
Not applicable

It's a combo box, I actually tried DataCardValue2_1.Selected.Text but Text isn't valid so I put value instead and it works perfectly,

 

Thanks for helping @SkiDK  !

Highlighted
Anonymous
Not applicable

Hi @Sergiu_S ,

 

I have already tried that, and even if it doesn't show errors, it still doesn't work,

 

What works in my case (because the field is a combo box) is 

DataCardValue2_1.Selected.Value
 
 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,749)