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 / How do i notify user i...
Power Apps
Answered

How do i notify user if two fields in the form have same value?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a form with To and From Office fields in an App recording the movement of mail within the company; both fields are Dropdown controls with the Office values populated into Items (rather than looking up values elsewhere). I want to notify users when the To and From values are the same as they should never be the same.

 

I have played around with a timer to show an error when the values are the same. Problem is I haven't quite figured out how to not show this error when there are blank values in both drowdown controls (which are the default values ). So as soon as the form loads the error message is displayed, I only want this to display if they have selected values other than blank e.g. To=Glasgow, From=Glasgow.

 

This is the formula  I have against the Timers OnTimerEnd variable: If(!IsBlank(DropdownNewSenOffice.SelectedText.Value) = !IsBlank(ReceivingOfficeNew.SelectedText.Value) ||!IsBlank(DataCardValue32.Selected.DisplayName) = !IsBlank(DataCardValue9.Selected.DisplayName),Notify("Please check the form for duplicate values",NotificationType.Error))

 

Any advice on above or alternative solutions would be very welcome

 

 

Categories:
  • Verified answer
    AnneZC Profile Picture
    65 on at

    Hi @Anonymous 

    I have tested this logic out with two text input boxes and it works like I think you want it to.

    I have put a formula in the OnChange property of each of the text input boxes rather than using a timer. Then the values will be compared any time one of the values changes.

     

    The formula in the OnChange property of TextInput1 is:

     

    If(Not(IsBlank(TextInput1.Text)),If(TextInput1.Text=TextInput2.Text,Notify("Values should be different")))

     

    and for the OnChange property of TextIput2 it is:

     

    If(Not(IsBlank(TextInput2.Text)),If(TextInput1.Text=TextInput2.Text,Notify("Values should be different")))

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks AnneZC!

    That worked a treat! I adapted the above formula to four fields as follows:

     

    Dropdown1: If(Not(IsBlank(Dropdown1.Selected.DisplayName)),If(Dropdown1.Selected.DisplayName=Dropdown2.Selected.DisplayName,Notify("Values should be different")))

    Dropdown2: If(Not(IsBlank(Dropdown2.Selected.DisplayName)),If(Dropdown2.Selected.DisplayName=Dropdown1.Selected.DisplayName,Notify("Values should be different")))

    Dropdown3: If(Not(IsBlank(Dropdown3.Selected.Value)),If(Dropdown3.Selected.Value=Dropdown4.Selected.Value,Notify("Values should be different")))

    Dropdown4: If(Not(IsBlank(Dropdown4.Selected.Value)),If(Dropdown4.Selected.Value=Dropdown3.Selected.Value,Notify("Values should be different")))

     

    Dropdowns 1 & 2 are people picker dropdowns and Dropdowns 3 & 4 are standard dropdowns

     

    thanks

     

    Mike

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
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard