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
4 replies
Subscribers
9 subscribers
Views
2276 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi everyone, I would like to know if it is possible to set default va
tiagos
over 9 years ago
Hi everyone,
I would like to know if it is possible to set default values for decimal input fields (in SAIL interfaces) to "zero" value, for example. By default, these values are filled by "null" but i want to change these values How this is possible?
Someone help me, please?
Thanks,
OriginalPostID-188932
OriginalPostID-188932
Discussion posts and replies are publicly visible
0
Eliot Gerson
Appian Employee
over 9 years ago
There are several ways you could implement this. In 7.11, you can use placeholder text, if the goal is to display "0" on the interface (see
forum.appian.com/.../SAIL_Components.html
). You can also use the expression if(isnull(<YOUR_ITEM>, 0, <DESIRED_VALUE_IF_NOT_NULL)) for the "value" attribute. For easy reuse, you can save this expression as a rule. You can also pass "starting values" into the interface, using parameters (see
forum.appian.com/.../Configuring_Process_Variables.html)
.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eliot Gerson
Appian Employee
over 9 years ago
Sorry, misplaced parentheses. It would be if(isnull(<YOUR_ITEM>), 0, <DESIRED_VALUE_IF_NOT_NULL)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
tiagos
over 9 years ago
Thanks a lot! It works perfectly.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jennifer Durina
Appian Employee
over 9 years ago
I would be wary about making it a habit to default data using the suggested if() method in the form. If a form field is not interacted with, the field will not save. In this case if zero is not interacted with and it doesn't save zero it probably won't be a problem (since integers default to zero anyways).
However if you're defaulting a field with something you may expect the user to take (let's say you default a boolean approval to "false") and the user doesn't change it, a null will be saved, not false.
A better way to default data on a form is to default the value of input in the user input task itself. You can default the data by setting the "value" attribute in the input to the data you want it to default to. Also by defaulting the data being passed in, your interface is more reusable--you could use the same interface but default different data values for different scenarios.
forum.appian.com/.../Data_Tab.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel