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 / Forms validating witho...
Power Apps
Unanswered

Forms validating without all required fields being filled in

(0) ShareShare
ReportReport
Posted on by 634

I am having a very odd behavior with my forms. Here is what I have. 

 

Screen1

4 forms - Form4(master) and Form1, Form2, Form3

The OnReset for the Form4 form resets the first 3 

 

 

ResetForm(Form1); ResetForm(Form2); ResetForm(Form3);

 

 

A submit button that is only editable(clickable) when Form1, Form2, and Form3 are valid

 

 

If(Form1.Valid && Form2.Valid && Form3.Valid, DisplayMode.Edit,DisplayMode.Disabled)

 

 

 

Now, the first time through the app everything works properly but if I try and add a new record the Submit button becomes active after getting through 3 of the 5 required fields in Form1. I have no idea why the others are validating. If I look at Form4 I see values in fields that should be reset. This is the code I am using on a temporary 'reset button' and the 'new' button.

 

 

 

//Rest button
UpdateContext({ShowPreview: false}); Set(glbFormData,Defaults('Tracking DB')); ResetForm(Form4)

//New button
Set(glbFormData, Defaults('Tracking DB')); ResetForm(Form4); Navigate('Build Tracking')

 

 

 

Any ideas why this is happening? This would probably solve another issue I've been having if I could understand why these From4 values are still around.

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

    @Future_Vision 

    Your Valid property for Form4 is where you really want all your logic to focus.  As a master form, it should have the logic in the required datacards and you should be looking at the Valid property from the form to determine if it is in fact valid.  Doing it on the child forms might have unpredictable results depending on several factors.

     

    So, I would focus the attention more to the master form (that's why it's called the master form) and see if that helps you through the issue.

     

  • Future_Vision Profile Picture
    634 on at

    @RandyHayes 
    The problem would still be there wouldn't it? If Form4(master) is still showing values for fields even though it has been reset it will still show as valid.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Future_Vision 
    Well, if your formula for the OnReset of Form4 was as you typed...then there is the problem.  I assumed it to be a typo, but you have:

    ResetForm(Form1); ResetForm(Form1); ResetForm(Form1);

    It should really be resetting 1, 2 and 3

    ResetForm(Form1); ResetForm(Form2); ResetForm(Form3);
  • Future_Vision Profile Picture
    634 on at

    @RandyHayes 
    That was a typo in my post. I went back and fixed it the way it is in the app. With a click on Submit the 3 forms get reset but Form4(master) does not reset. I've tried resetting Form1, Form2 and Form3 from the 'reset' button and just resetting Form4 directly. Neither approach works. I have another post in this forum where values were being help onto but I couldn't track down where. Maybe this is related. Could this have something to do with the mode the Form4(master) is in?

  • Future_Vision Profile Picture
    634 on at

    Just a little more info. If I look at my Brand1 datacard in Form2 the default value is blank. That default value in Form4 is using a value form a previous record. Perhaps there is a clue there.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Future_Vision 

    The forms should all be in Edit mode all the time and should never change.  

    The Items property of the master should be reflecting your glbFormData and the other forms : Patch(glbFormData, Form1.Updates, Form2.Updates, Form3.Updates)

     

    I did not see the other post, but perhaps this is all related.

  • Future_Vision Profile Picture
    634 on at

    @RandyHayes 
    That would be correct. This is what I have for the Item for Form4

    If(varCopy=true, Patch(glbFormData, Form1.Updates, Form2.Updates, Form3.Updates, {crfeb_trackingdbid:Blank()}), Patch(glbFormData, Form1.Updates, Form2.Updates, Form3.Updates))

     

    Form1, Form2, and Form3 use glbFormData as their Item

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Future_Vision 

    So, is there a particular field or set of fields that don't seem to be getting reset, or is it all of them?

    And how about the Item property on Form4...if you look at the record in the formula editor (the resultant record from the Patch), does it show data that it shouldn't or is it pretty empty?

  • Future_Vision Profile Picture
    634 on at

    @RandyHayes 

    It looks like all of the datacards where I removed the default text field and replaced with a combobox that do not get reset. In the Form4 Item the glbFormData variable is empty. The FormN.Updates all show the hold-over data that didn't get reset. 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Future_Vision 

    Ah yes the custom controls...

    Are the Default properties of those controls referencing Parent.Default or are they deriving their values through some other means?

     

    You can also put in the OnReset action of the child forms individual Resets for the comboboxes and other controls that need to reset.  i.e.  Reset(yourCombobox); Reset(yourOtherCombobox) etc.

     

     

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

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard