Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Comparing Logged In User to Submitter

(0) ShareShare
ReportReport
Posted on by

Hello and good morning,
I have two text input boxes whos display mode is set to Disabled.

ChrisL58_0-1716984209536.png

The default for the Submitter is: 

ThisItem.'Created By'.DisplayName
The default for the Logged In User is: 
User().FullName
 
I have some controls on my form that I would like to disable if both of those controls are equal to each other.
When I attempt to do is set the displaymode using If(txtSubmitter.Text) = (txtLoggedInUser.Text), displaymode.Disabled, displaymode.Edit But the formula complains.

Currently I have some logic in the DisplayMode 
If(DataCardValue34.Selected.Value="Corrections Needed",
    DisplayMode.View,DisplayMode.Edit) and this works.

Is it possible to compare two controls like I have?
Categories:
  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: Comparing Logged In User to Submitter

    Okay perfect,

     

    Could you then accept the answer as solution? 

    This way we can all help each other in the community. Others can find the answer faster and those who want to help can see that this is solved and focus on other Questions. 

     

     

  • ChrisL58 Profile Picture
    on at
    Re: Comparing Logged In User to Submitter

    Thanks for responding!
    Yes, was driving me a little batty but this worked after I deleted the old controls, added a new custom datacard and inserted two new controls. 

    If(txtLoggedInUser.Text=txtSubmitter.Text,DisplayMode.Disabled,DisplayMode.Edit)
  • Verified answer
    DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: Comparing Logged In User to Submitter

    Hey @ChrisL58 ,

     

    Can you try this? 

     

    If(txtSubmitter.Text = User().FullName, displaymode.Disabled, displaymode.Edit)

     

    This should be Working. 

    I think you closed the Parantheses "(" too soon.

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard