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 / 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.
3.png
Categories:
I have the same question (0)
  • timl Profile Picture
    36,715 Super User 2026 Season 1 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
    154,471 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard