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
5 replies
Subscribers
7 subscribers
Views
3596 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
In UI, for a submit button, if a confirmMessage text is set along with a validat
smrutis
over 9 years ago
In UI, for a submit button, if a confirmMessage text is set along with a validationGroup, is there a way to handle the confirmMessage ONLY if the validation group is validated?
Now the confirmMessage pops up along with the validation errors if in case of any. Can we control the order? anyone please?
OriginalPostID-166312
OriginalPostID-166312
Discussion posts and replies are publicly visible
0
Tom Ryan
Appian Employee
over 9 years ago
If you pass an empty value for the confirmMessage, it doesn't show the popup. Based on this, you can use the logic for your validations to either show a confirmation message or not. This will look something like:
a!buttonWidgetSubmit(
label: "Submit",
style: "PRIMARY",
confirmMessage: if(rule!<YOUR VALIDATION LOGIC>, "<YOUR CONFIRMATION MESSAGE>, {}),
saveInto: {}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
abhi.jana
Appian Employee
over 9 years ago
You should be able to conditionally display the confirm message. For example -
confirmMessage: if(<validation successful expression>,"Are you sure?","")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
smrutis
over 9 years ago
Is there a way to use if-condition with validation group and confirmMessage please?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nareshs427
Certified Senior Developer
over 9 years ago
Hi Smrutis,
Please check below code snippet for confirmMessage, which checks the validations first and displays button's confirmMessage once all configured validations are satisfied. Here <<validationGroup>> must be same for the actual button and components to check.
confirmMessage: if(and(a!buttonWidgetSubmit(validationGroup:<<validationGroup>>).@attributes.@anyAttribute.validationGroups=<<validationGroup>>,<<Validation condtitions configured for the each component used in the form with same validationGroup>>),"",<<Your confirmaMessage>>)
This workaround might not be recommended but it works for your case. Please find attached sample SAIL form which is working fine with this work around.
Sample.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@smrutis Hi, to a considerable extent, the suggestions given by Tom Ryan and Abhi Jana here occupies upper hand in terms of solution to your problem. But what I would like to suggest from my experience is, these approaches literally causes the interface to render slowly which could be because of the complex validations we have in place. You might not observe the difference if you form consists of few components, but there could be significant impact when the form is much dynamic in nature and has complex validations, which thereby results in 'Working..' message for most of the times.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel