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 Platform Community / Forums / Power Apps / Print error message if...
Power Apps
Answered

Print error message if the value matches with the Sharepoint List Item

(2) ShareShare
ReportReport
Posted on by 6
Hi, I have a text input control where the user enters the value. I need to check if that value is present in the SharePoint List where I have many columns. If the value is present, then I need to display one error message saying, "This value already exists" and I need to disable the Submit button.
 
please help me to resolve this issue.
Thanks in advance.
Categories:
I have the same question (0)
  • timl Profile Picture
    36,415 Super User 2025 Season 2 on at
    Hi  CU22110541-1 
     
    It's difficult to disable the Submit button because you would need to write formula in the OnChange of the text input control to check for an existing value. A user could type into the text input control and click the Submit button whilst it's still enabled, instead of clicking some other control first to run the check. 
     
    What I suggest is that you do the check in the OnSubmit of your button. The is the formula that notifies the user if the value already exists.
     If(
       IsBlank(
            LookUp(
                YourSharePointList,
                YourColumnName = TextInput1.Text
            )
        ),
        SubmitForm(Form1),
        Notify("This value already exists")
    )
     
  • Verified answer
    WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at
    Are you testing for it being present in a particular column or multiple - firstly for a single column OnChange of the Text Input
    If(
       !IsBlank(
          LookUp(
             SPList,
             YourFieldName = Self.Text
          )
       ),
       Notify(
          "This value already exists",
          NotificationType.Error
       )
    )
    then the DisplayMode of the Submit button
    If(
       !IsBlank(
          LookUp(
             SPList,
             YourFieldName = YourTextInput.Text
          )
       ),
       DisplayMode.Disabled,
       DisplayMode.Edit
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

  • CU22110541-1 Profile Picture
    6 on at
    Hi @WarrenBelz, thanks for your response. It worked.

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 765 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 272

Last 30 days Overall leaderboard