Solved! Go to Solution.
Hello,
Yes, if you have required fields, then PowerApps will display that message if the SUBMITFORM function is called and those fields are not filled in.
If you do not want the SUBMIT button to be enabled until these fields are filled in then you can add some additional criteria to your SUBMIT button's DisplayMode property:
If(AND(yourformname.unsaved, !IsBlank(datacard1), !IsBlank(datacard2)), DisplayMode.Edit, DisplayMode.Disabled)
If you want to clear the form and add a new record then after your SUBMITFORM function, set the form's DisplayMode to NEW. I think the NewForm function will automatically reset the entire form.
SUBMITFORM(yourformname); NewForm(yourformname)
Hope this helps.
Hello,
Yes there are a few ways. The easiest way is to use the form's unsaved property. This returns a true or false. For the submit button on its DISPLAY MODE property: If(formname.unsaved, DisplayMode.Edit, DisplayMode.Disabled)
Hope this helps.
Hello @Anonymous
Your suggestion worked properly.
Thanks for that.
Now I have two required fields (DataCards) which is showing the message "An entry is required or has an invalid value. Please correct and try again."
After this step, i would like to reset this 2 fields and allows the user a try insert again.
Could you please help me?
Hello,
Yes, if you have required fields, then PowerApps will display that message if the SUBMITFORM function is called and those fields are not filled in.
If you do not want the SUBMIT button to be enabled until these fields are filled in then you can add some additional criteria to your SUBMIT button's DisplayMode property:
If(AND(yourformname.unsaved, !IsBlank(datacard1), !IsBlank(datacard2)), DisplayMode.Edit, DisplayMode.Disabled)
If you want to clear the form and add a new record then after your SUBMITFORM function, set the form's DisplayMode to NEW. I think the NewForm function will automatically reset the entire form.
SUBMITFORM(yourformname); NewForm(yourformname)
Hope this helps.
User | Count |
---|---|
198 | |
105 | |
89 | |
45 | |
43 |
User | Count |
---|---|
245 | |
105 | |
103 | |
65 | |
60 |