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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change displaymode pro...
Power Apps
Unanswered

Change displaymode property based on text box value

(0) ShareShare
ReportReport
Posted on by 212

I have a text box for the Invoice Approver. This is the default value: dd_FirmFileNo.Selected.'Legal Cost Approver'.Value

Base on what is selected in the Firm file no. the Invoice approver value gets updated. This infomation comes from another list.

 

I like to controls some datacards display mode based on the Invoice Approver. If the Invoice Approver value equals "John Smith"

then displaymode.Edit otherwise, view.

 

I have also looked at creating a list of users to manage permissions in this similar context. Please provide some suggestions/help with this.

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Excellent!

  • mthiru_0023 Profile Picture
    212 on at

    @TheRobRush  thanks rob. this did it for me : If( User().FullName=txt_InvoiceApprover.Text, DisplayMode.View, DisplayMode.Edit)

  • TheRobRush Profile Picture
    11,128 Moderator on at

    If it should be referencing the user you probably need to do somehting like

    Switch(ThisItem.InvoiceApprover=User().FullName,DisplayMode.Edit,DisplayMode.View)
    

     

    but you should throw a label somewhere and type User. and then try each option stored in your User() information to find the right one to match to your  reference column

  • mthiru_0023 Profile Picture
    212 on at

    I need to compare the user logged in equals the txt_InvoiceApprover then enable the display mode.

  • mthiru_0023 Profile Picture
    212 on at

    @TheRobRush sorry some help with this.

     

    I am little confused on how to reference Invoice approver value. Textbox with value = txt_InvoiceApprover

    Should be comparing the datacard with this  - in that case: InvoiceApprover_DataCard1

     

    Switch(ThisItem.InvoiceApprover=txt_InvoiceApprover.Text,DisplayMode.Edit,DisplayMode.View)

  • TheRobRush Profile Picture
    11,128 Moderator on at
    Switch(Invoice Approver (However you reference this value), 
     "John Smith", DisplayMode.Edit, 
     DisplayMode.View)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 365 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard