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 / Validate Patch update
Power Apps
Unanswered

Validate Patch update

(0) ShareShare
ReportReport
Posted on by 270

Hi,

 

I am wanting to validate that all the required fields are filled in prior to updating a form which is using Patch to update.  I can get it working fine if I sumitform as it seems the validation is built-in to the submit form but I cannot use submit form as it resets all my tabbed pages which are based off the same record and is not an option.

 

I want to Patch the form - Patch('Secure Print Assessments',First(Filter('Secure Print Assessments', ID=CustomerGallery.Selected.ID)),GAForm.Updates)) - this update works fine but how do I validate it first?

 

I have found Validate( Scores, EditRecord, Gallery.Updates ) but I do not know what the EditRecord would be???  If I use Validate ('Secure Print Assessments', EditRecord, GAForm.Updates) it says the Validate has syntax errors - specifically on EditRecord but I do not know how to reference the current record I am trying to validate.  I tried variations of ID=CustomerGallery.Selected.ID instead of EditRecord but no luck.

 

Also if I was to get past this would I then need to check if the result is blank to go ahead with the patch of will the validate stop any commands further on?   

 

All I want to do is check the datacards are filled in - I have many of them so I do not want to jhave to reference each and everyone of them to check if the field is empty - that would be a nightmare.

 

Any ideas?

Categories:
I have the same question (0)
  • Sofie_D Profile Picture
    260 on at

    Try replacing EditRecord with LookUp(Scores, ID=CustomerGallery.Selected.ID)

     

    To make sure the required fields aren't blank, n my PowerApps I usually use the Rules feature and make the submit button disabled unless all required fields aren't empty anymore. Though there may be easier solutions.

  • Gargoolgala Profile Picture
    270 on at

    Sofie, thanks for the input.  Using lookup has not given me an error but now I am attempting to work out how to use it

     

    If(IsBlank(Validate('Secure Print Assessments',LookUp('Secure Print Assessments',ID=CustomerGallery.Selected.ID),GAForm.Updates)),UpdateContext({Test:true}),UpdateContext({Test:false}))

     

    My label text is set as If(Test=true,"Blank","Not Valid") - I also always reset Test to false on screen visible.

     

    Everytime it runs I get a return of Blank in my textbox - which to me is saying it always validates - yet I know the form does not have required fields. I am sure there is a way about this but the documentation is non-existent and I am relient on forums like this.

     

    I would love to know what SubmitForm is doing in the background to check the required fields and how it can be done with a Patch command as Submit form seems to work great.

     

    Is there any debugging options in PA?  Is there any support?  Is PA only designed for simple forms?

  • AlexandraJ Profile Picture
    2 on at

    Hi,

     

    Did you finally make it work? I'm having the same issue with my app and I'm really new working with PowerApps.

  • Matthew Profile Picture
    9 on at

    Are there any updats on this?

  • Tom_Slosse Profile Picture
    1,430 on at

    Hey all

     

     

    I guess the answer here is like @Sofie_D said. 

    Just use rules to disable your submit button until all fields are filled in.

     

    With the Validate option you can only pass in your datasource and some records, but in this case the validation is not in the datasource itself but on the form so therefore you need to use Rules.

     

    Kind regards

     

    Tom

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard