Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
+2
person also asked this
people also asked this
Replies
7 replies
Answers
1 answer
Subscribers
9 subscribers
Views
6497 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
When invalid date is entered into a date field, value not resetting when saving {} to value
charlesa480
Certified Lead Developer
over 7 years ago
When invalid date is entered into a date field, value not resetting when saving {} to value
Text or non-compliant date entered e.g. ‘abc’ or ‘13/32/9999’
o Default validation fires correctly
o When clicking reset button to save {} or ‘’ to the date variable value, the date field remains with the user entered data
Customer wants to know if there is a way to clear this invalid data using a reset button. Now if they click reset nothing happens.
OriginalPostID-259012
Discussion posts and replies are publicly visible
0
aloks0189
Certified Lead Developer
over 7 years ago
@charles I think there might be something incorrect in configuration, try following
Assume the rule input which holds the entered date value is ri!dateValue , so you could something as below
a!dateField(
lebel: "Enter Date",
value: ri!dateValue,
saveInto: ri!dateValue
)
Now for button write as below
a!buttonWidget(
label: "Reset",
saveInto: {
a!save(ri!dateValue, null)
}
)
Make sure, this button is not a!buttonWidgetSubmit() instead it is a!buttonWidget which doesn't allow form submission by default, as the value for submit parameter is set to false
Hope this will help you
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 7 years ago
I am sorry there is a typo mistake, it's label not, lebel, avoid any typo mistake, if there are any
Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 7 years ago
This might be a stupid question, but have you tried saving null to the variable? {} is an empty array and '' is actually an empty string...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
charlesa480
Certified Lead Developer
over 7 years ago
It's a local var.
Button is not a submit type.
Saving '', {}, or null has the same result.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
+1
Mike Schmitt
Certified Lead Developer
over 7 years ago
I don't believe the a!dateField actually saves any value into the destination variable when an invalid input is entered. You can test this for yourself pretty easily by adding a read-only a!textField just after your date fields and populate it with the value of one of the destination variables.
Assuming i'm right, i'm not sure what the solution would be considering that the reset button would have nothing to reset in this case. It might just need to be chalked up to a training issue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel
0
Josh
Certified Lead Developer
over 7 years ago
To echo what @mschmitt said, it looks like the date field component has some internal functionality where it will save and display the invalid value you entered (probably in a local variable) but null out the saveInto target you specified. This doesn't leave us with much flexibility in handling your situation.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
charlesa480
Certified Lead Developer
over 7 years ago
Gotcha thanks.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel