Skip to main content

Notifications

Power Apps - Building 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.

  • TheRobRush Profile Picture
    TheRobRush 11,121 on at
    Re: Change displaymode property based on text box value

    Excellent!

  • mthiru_0023 Profile Picture
    mthiru_0023 212 on at
    Re: Change displaymode property based on text box value

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

  • TheRobRush Profile Picture
    TheRobRush 11,121 on at
    Re: Change displaymode property based on text box value

    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
    mthiru_0023 212 on at
    Re: Change displaymode property based on text box value

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

  • mthiru_0023 Profile Picture
    mthiru_0023 212 on at
    Re: Change displaymode property based on text box value

    @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
    TheRobRush 11,121 on at
    Re: Change displaymode property based on text box value
    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard