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

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
VDS_Mantra
Resolver I
Resolver I

Hi,

 

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

 

Hope it will help. 

SkiDK
Solution Sage
Solution Sage

Hi @Anonymous ,

I think you just have to use next:

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

 

Anonymous
Not applicable

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

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 .

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

Sergiu_S
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

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  !

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,748)