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 / Caution message on dat...
Power Apps
Answered

Caution message on data card when duplicate employee ID exists in the SharePoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to display a caution message to the user when they enter an employee id that already exists in the SharePoint list.  Duplicates can be entered but we want to warn them that one exists so duplicates are created only when really needed.

 

Can someone help me with the code and steps to do this?  I am very new to PowerApps.  

 

SharePoint List: Flexible Schedule

Data Card: Employee ID_DataCard1 

 

Thank you!

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

    @Anonymous 

    Assuming your Employee ID SP column is called EmployeeID, you could try this:

     

    If ( DataCardValue1.Value = LookUp('Flexible Schedule', EmployeeID = DataCardValue1.Value, EmployeeID), " << your caution message >> ")

     

    depending on your data types you may need may need to play around with wrapping the data card values in Value() if numbers or use ... .Text if text fields.

     

    You will likely need to place this code in the text property of a label somewhere in your app canvas.

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Each data card contains a ErrorMessage1 Label, we can use it to display the caution message.

    Set the Text property as below: 

     

    If(DataCardValue1.Text in [@'Flexible Schedule'].'Employee ID', "This Name exists",Parent.Error )

     

     Snipaste_2019-12-23_17-21-55.png

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-siky-msft this was perfect, thank you very much!

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard