Notifications
Announcements
I created a multistep form with 5 steps. Step # 3 contains a SubGrid to insert data on a child table.
How can I make this step mandatory to prevent users from skipping it?
If all you need to check is that there is at least 1 record in the subgrid, the easiest way is to add a custom validation in JQuery/JavaScript and in it look for a table row in the subgrid. However, you may also want to disable the Next button until after the subgrid has loaded (as it completes its load after document.ready).
For pushing a custom validator on the Validator object see this example: https://learn.microsoft.com/en-us/power-pages/configure/add-custom-javascript#additional-client-side-field-validation
For detecting when the grid has loaded it it gives a "loaded" event and will be similar to the List code: https://learn.microsoft.com/en-us/power-pages/configure/add-custom-javascript-list , this link is someone counting subgrid rows on loaded https://powerusers.microsoft.com/t5/Power-Apps-Portals/Count-number-of-rows-in-subgrid-and-update-text-field-with-that/td-p/1345421
@Fubar Thank you! I'll give it a try.
Please note that you might face an issue about Page_Validators not being defined if all you have in your step is the subgrid.
If you face this issue, all you need to do is add a regular field in the form (like the name field), and you can hide it via JS.
I mention that somewhere in this video: https://www.youtube.com/watch?v=7S0-Uxe7mrI&pp=ygUhb2xpdmVyIHplcm8gdG8gaGVybyB2aWN0b3IgZGFudGFz
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Jerry-IN 71
Fubar 62 Super User 2025 Season 2
sannavajjala87 31