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 Apps
Answered

Confirm 2 fields

(0) ShareShare
ReportReport
Posted on by

I created a Canvas form in Powerapps - I have embedded it into a Sharepoint. 

I have 2 fields (SSN) and (Confirm SSN).   I want the user to receive an error if the Confirm SSN field does not match that of the SSN field.  

I'm sure this is something simple that I am overlooking but I feel like I have read every "How To" there is to read at this point and my deadline is coming up. 

I made the fields "text" fields.  So they are text fields that will need to match.

Any help is greatly appreciated. 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Sorry - I should have given more information.   I made the fields "text" fields.  So they are text fields that will need to match.

  • mdevaney Profile Picture
    29,989 Moderator on at
    @BridgetteBayne
    The code to compare two Text Inputs would look something like this. If you put it in the OnSelect property of a label it will show true when matching and false when different.

    TextInput1.Text=TextInput2.Text

    Let me know what further instructions you require.

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • Community Power Platform Member Profile Picture
    on at

    Thank you so much for the prompt response.  I tried that one already but I just did it again, and it is giving me an error. 

     

  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at
    @Anonymous
    Thank you for the amazing screenshots!

    The error is appearing because you put it in the OnSelect property. For instance if you put this code in the BorderColor property instead the border would turn Red if the two inputs don’t match

    If(TextInput1.Text=TextInput2.Text, Black, Red)

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • Community Power Platform Member Profile Picture
    on at

    Hoping you can look at this.  I truly don't know where I'm going wrong here. 

  • mdevaney Profile Picture
    29,989 Moderator on at
    @Bridgettebayne
    It would be something like this

    If(DataCardValue46.Text=DatacardValue47.Text, Black, Red)

    I can’t actually tell if it’s DataCard47 since the screenshot is cut off but you should be able to confirm the number

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • Community Power Platform Member Profile Picture
    on at

    There is clearly something off in my SP columns or fields somewhere.  The error keeps telling me that Data Type for my fields is unsupported for evaluation.  Even though it is basic text.  And because I created in Canvas (I assume that is why), I cannot change the control. The option is there in the Fields, but when I select it, it does nothing.  But I am going to mark your answer as the solution because I know that should my controls be set properly, it would have worked just fine. 

     

    Thank you for your time and assistance.

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
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard