web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Condition if clicking ...
Power Apps
Answered

Condition if clicking on an Edit Button

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, I have this condition, it is returning error as type of argument not valid:

 

If(DataCardValue44.SelectedItems.DisplayName=User().FullName, DisplayMode.Edit, DisplayMode.View)

 

What I want is that quen some one click de Edit Button it becomes editable only if de User name is the same deployed in the DataCardValue44 andi if not then don´t allow to edit.

 

Thanks for your help!

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Consider changing your formula to the following:

    If(DataCardValue44.Selected.DisplayName=User().FullName, DisplayMode.Edit, DisplayMode.View)

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It´s now sending an error: invalid number of arguments and unexpected characters 😞

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Can you please supply some screenshots and also some of your formulas?

    Of particular interest are the DisplayMode property you are trying to change and the Items property of DataCardValue44.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    AllisonCruz_0-1600117560579.pngAllisonCruz_1-1600117654738.png

    AllisonCruz_2-1600117770038.pngAllisonCruz_3-1600117811324.png

     

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Ah language...looks like you need to utilize semicolons rather than comas in your formulas.

    Try this:

    If(DataCardValue44.Selected.Value=User().FullName; DisplayMode.Edit; DisplayMode.View)

    Also, since you have only Choices for the DataCardValue44 items, then your only column available for compare would be the Value column.

    See if the above gets you further.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard