Our team has been having a difficult time figuring this out. I'll try and do my best explain clearly.
We have a child interface where you add a creditor and a debtor. The field level validations are working fine in the form itself. The validations I'm referring to here are, there is a debtor section where the debtors are added to an array rule input. Same with creditors. This interface is called in the main wrapper interface where the "Next", "Back", etc buttons are located. The requirement is to be, **only when a user clicks "Next"** is it supposed to check for page level validations. Meaning once a user clicks "Next" it'll check to see if there is both a creditor and debtor added. If it finds that there is no debtor added, for example, an error message will display to the user saying "You must have at least one debtor and one creditor added to proceed," and the page count will not progress.
We're having trouble figuring out how to connect the section validations in the child interface to the "Next" button in the parent interface.
We've also messed around with a custom validation message displaying thru richText.
I hope this makes sense. Any suggestions would be appreciated. Thanks!
Discussion posts and replies are publicly visible
Hello KristinForeyt
Have you tried validation Group? use and Rule input in your child interface and then configure the same in button widget of your parent interface.Validation Group
We've messed around a little with validation group but let me try again. Validation group has always kind of confused me hahaha. But going to try again wtih it and will let you know. Thanks!
You just set the validate to true for your "Next" button and add these validations on your fields. That should work. Make sure to set the validate to false on the "Back" button.
Refer to this blog - appianspace.com/.../
Validate is set to true
Then it should work. what problem are you facing? Is it not validating in any case or is it validating on both of the above cases?
The field level validations in the form input fields are working, that's not the issue. I basically need to validate the sectionLayout of the child interface. the "Next" button is on the parent wrapper interface. It needs to validate that there is a debtor and a creditor added when a user clicks "next". If one or the other isn't added, then an error message will display.
Right now, nothing is validated when a user clicks "next". We have made it to where the error message displays upon page-load and will disappear once a user has added a debtor and creditor, but that's not the desired behavior.
I've been messing around with this and I cannot get the validation group passed through the rule input. I'm not sure what I'm missing haha. On the documentation it specifically says that if validationGroup is assigned, any validations or required messages won't run until the validationGroup button is clicked. But on the child interface the validation message is showing all the time and on the parent interface it displays on page load still. I can't figure out how to get it to not show up until the button is clicked.
I actually ran across this a!validateMessage function which, for a moment, I thought worked as I set validateAfter to "submit" but the problem I ran into is it also validated when I clicked "add" in the form interface (which has properly working field level validations and is not the issue here) when a user adds a debtor or creditor, and not just the "next" button in the entire page wrapper. But I might be able to work up some logic in this function to see if this would work as a possibility... but nothing yet.