Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
7 subscribers
Views
3029 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have attached the Screen shot and Sail code. Form should not submit when numer
jegadeeswaran
over 9 years ago
I have attached the Screen shot and Sail code. Form should not submit when numeric validation failed in the hidden section. Pease assist on this.
OriginalPostID-143944
OriginalPostID-143944
Discussion posts and replies are publicly visible
0
jegadeeswaran
over 9 years ago
attached the Screenshot and Sail code.
sailcode.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Conor Cahill
Certified Lead Developer
over 9 years ago
You can do form-level validations in the a!formLayout() in order to check the saved value passes numeric validation.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Your SAIL code appears to work as you describe; a value of 0 for local!c or a non-integer value for local!b prevents the form from submitting.
You can check this by looking at the value of ri!cancel when in the interface designer (which is mapped to both buttons); it remains null. Once the value of ri!cancel changes, that's the form submitted.
Whilst it may look like the form is submitting when you click the button as you see the "Loading" notification at the top of the screen, the form won't have submitted until the value of ri!cancel changes.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jegadeeswaran
over 9 years ago
philb/conorc . Please give first text field in local!b and next text field in local!a and null in local!c then form submits even if numeric validation failed in local!b but it should not. Bottom section will be hidden by giving the value in local!a. Pls assist on this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
This is because, as far as the form is concerned, the two lower fields do not exist if the top field is populated; there's no validation as the fields simply don't exist. What exactly is the use case here?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Conor Cahill
Certified Lead Developer
over 9 years ago
You have to put the numeric validation in the validations field in the a!formLayout(). That way the validation will always be checked, even if a specific section is hidden.
You'll need to write a rule to check if local!b is a number, usually that's done this way:
ri!variable: the string you'll be performing the numeric validation on.
len(cleanwith(ri!variable,"0123456789"))=len(ri!variable)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jegadeeswaran
over 9 years ago
Philb - SAIL form does not support section within section. Hence we build the screen attached with multiple richtext link so the user can collapse and un collapse. Each link will call sail form which has multiple section. Issue: if user collapse and submit then form submit even if numeric validation fails but user expects not to submit the form and populates error message that numerica validation fail.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
conorc is right - you can write form-level validation for this and check against the values of local!a, local!b etc.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jegadeeswaran
over 9 years ago
philb/conorc For Numeric validation, i will make column a!textField from a!integerField and check for formlevel validation as mentioned by conorc. We do have date validation, we cant do the same for date validation as we cant change a!dateField to a!integerField for date.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jegadeeswaran
over 9 years ago
and also if column field is defined as a!integerField value will not be saved if the numeric validation fails and it will be saved as null.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel