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
2790 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi, I have a form with 6 buttons and the same form is being reused for two
sumitp584
over 9 years ago
Hi,
I have a form with 6 buttons and the same form is being reused for two different types of cases say Type A and Type B.
If Type A user logs in then according to the button clicked there are different validation groups called for each button and similarly for type B.
There are too many fields in the form, so if the user misses to enter something in the form when he clicks the button at the bottom, he has to scroll up to see what he missed out. So now am planning to give a validation message at the bottom of the form.
Now here is my question - When the Type A user logs in, i have to have different validation groups called at the same time. I have given condition like if(Type A, "Validation button1", Validation button2), but here i have to validate more than one 1 like if(type A, {validation1 ... 6}, {validation 1 ... 6}).
Is there any way to have multiple group validation of this sort?
OriginalPostID-181086
OriginalPostID-181086
Discussion posts and replies are publicly visible
0
vaibhavm
A Score Level 2
over 9 years ago
Hi Sumit take a look at this SAIL recipe
forum.appian.com/.../SAIL_Recipes.html
It might help you out
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
The validations attribute is a list so you should be able to do something like the following:
validations: if(
ri!type = "Type A"
{
if(ri!field1 = "test1", "Test1 not allowed", ""),
if(ri!field2 = "test2", "Test2 not allowed", ""),
if(ri!field3 = "test3", "Test3 not allowed", ""),
if(ri!field4 = "test4", "Test4 not allowed", "")
},
{
if(ri!field1 = "check", "Check not allowed", ""),
if(ri!field4 = "no", "No not allowed", ""),
if(ri!field7 = "test", "Test not allowed", "")
}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sumitp584
over 9 years ago
Hi Vaibhavm, i came across that already, but as you can see in my true condition i have 6 buttons to be validated similarly in the false part too. thats where am having trouble.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Just to add, you can probably write this in a way that doesn't require validation groups; take the buttons and fields out of validation groups and move all the validation to the section validation parameter, which is constructed conditionally as above.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sumitp584
over 9 years ago
Hi @philb, i tried giving the conditions as you have stated above, but it seems its not taking up the validation group. Is there any other way to do this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sumitp584
over 9 years ago
@philb, then it would be more complex, as i have lot of fields and also some fields are mandatory depending upon the value selected by the user and hence it would require a complex if else conditions, which still is doable and can be handled but my aim is to accomplish the same around validation groups so that it would be easy to get it done
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Ah ok, I understand what you're trying to do now. I don't believe a sail component can be in more than one group so I'm not sure you'll be able to do it the way you're trying to - but you might be able to define a validation group for every combination of types and then use a function such as choose() to select one of them.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sumitp584
over 9 years ago
@philb I already have different set of validation group around each case type. The problem is to call all of them at one place. I tried to have validationGroup: {"validation1", "Validation2"..6}, that dint work, tried your idea of nested if conditions that dint work too.. So if its type A there are 6 validation groups and if its type B there are another 6 validation groups to be called and validated against.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
You should switch the button's validation group for the different scenarios too as the button also can't be in more than one validation group.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
@Sumit: See if this helps ..
forum.appian.com/.../e-176796
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel