Can we fail a Form Action
Hi,
We have a Form Action on NUX that creates a list item and then adds values to certain line items. It was setup as per the requirement but now we want the action to not proceed if the difference between Start Date and End Date (both mandatory line items in the form) is beyond 30 days.
Is it possible to fail the action somehow if the conditions aren't met? I know that forms sit on top of the model so I cannot use Read/Write access to stop a mandatory field from being filled. Let me know if you have any ideas.
Best Answer
-
As @rob_marshall indicated as well, Forms do not currently support pre-submission validation for the fields you're looking for. There are only additional validation options for text-formatted line items. The only way to provide validation for data ranges is after Form submission (or using another method of submitting values without leveraging Forms).
There are a variety of techniques used for validating user input after submission, most of which are outlined in this two-part series on validation: https://community.anaplan.com/t5/How-To/Part-1-Validating-user-input-in-Anaplan-Approaches-and/ta-p/143320
There are also some relevant open Ideas on the Idea Exchange. You can add your commentary and use case to an existing issue, or if none of them quite capture the need, go ahead and submit a new one and post the link back here so we can kudo it!
- https://community.anaplan.com/t5/Idea-Exchange/Ability-to-apply-validations-to-list-fields-when-using-a-Form/idi-p/82299
- https://community.anaplan.com/t5/Idea-Exchange/UX-Field-Cards-conditional-formatting-custom-validation-messages/idi-p/93811
- https://community.anaplan.com/t5/Idea-Exchange/Customisable-pop-up-messages-to-warn-end-users-of-bad-input/idi-p/34649
- https://community.anaplan.com/t5/Idea-Exchange/Ability-to-define-quot-Valid-Range-quot-for-numbers-in-the-Line/idi-p/38631
- https://community.anaplan.com/t5/Idea-Exchange/Ranges-allowable-values-for-number-input/idi-p/86699
1
Answers
-
Create a validation line item that is formatted as a boolean with the logic: (End Date - Start Date) > 30
And then use that line item as a filter for a view that the action uses.
0 -
Hi Rob,
I was talking about Forms on NUX that would help us create items in a list. Sorry if that wasn't clear.0 -
No, you were clear, I was just advocating for a different way, using an action. Sorry if I wasn't clear on that.
Rob
0 -
Yeah seems like the easiest and simplest thing to do. Thanks for validating!0