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 / Sharepoint list form s...
Power Apps
Answered

Sharepoint list form set error

(0) ShareShare
ReportReport
Posted on by 137

I am editing a form for a sharepoint list in PowerApps.  I want to add additional validation to my form but i cant work out how to stop the form being able to be saved?

 

At the moment i have set the Text property of the error message like this:

 

If("For Sale" in DataCardValue2.Text, "dont use for sale", Parent.Error).

 

This works - the error shows if they use For Sale and also shows the standard error if the field is empty (its a required field), but the user can still save the form in the first instance.

cheers

 

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @StevieC 

    Put the condition in the Display mode of the button and set it's default to disabled.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @StevieC 

     

    This is because even though the error message shows, there is no restriction on the submit of this form. You can configure this by disabling the Submit button if the "For Sale" keyword exist in your input control.

    Submit Button -> DisplayMode -> If("For Sale" in DataCardValue2.Text, DisplayMode.Disabled, DisplayMode.Edit)

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • StevieC Profile Picture
    137 on at

    Unfortunately its not that simple as this is a SharePoint form edited in PowerApps, so the save button isnt part of the form (not sure how this works!)

  • StevieC Profile Picture
    137 on at

    Hi - see my response above - cheers

     

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @StevieC 

     

    I see what you are trying to say. In that case, you can update the OnSave property of the SharePoint Integration to below expression:

    If("For Sale" in DataCardValue2.Text, Notify("Error Message", NotificationType.Error), SubmitForm(SharePointForm1))

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • StevieC Profile Picture
    137 on at

    That's the ticket! 🙂  Thanks for your help

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

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard