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
+1
person also asked this
people also asked this
Replies
10 replies
Subscribers
7 subscribers
Views
9129 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Display Number in Dollar() Format
zrizvi
over 8 years ago
Can someone please tell me the best way to display this decimal number in dollar() format in my SAIL form? Here's my code:
a!floatingPointField(
label: "Total Cost",
labelPosition: "ABOVE",
value: ri!totalCost,
saveInto: ri!totalCost
refreshAfter: "UNFOCUS",
required: true,
validations: {}
)
OriginalPostID-247183
Discussion posts and replies are publicly visible
Parents
0
Chris
over 8 years ago
To use a floating point field, you cannot place text "$" within the value portion - we use the method suggested by sikhivahans above, placing "$" in the field label. If you must place the "$" in the value you will have to use a textField, with something like:
load(
local!totalCost: 0,
a!textField(
label: "Total Cost",
labelPosition: "ABOVE",
value: "$" & if(isnull(local!totalCost),0,fixed(local!totalCost,2)),
saveInto: a!save(local!totalCost,todecimal(save!value)),
refreshAfter: "UNFOCUS",
required: true,
validations: {}
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Chris
over 8 years ago
To use a floating point field, you cannot place text "$" within the value portion - we use the method suggested by sikhivahans above, placing "$" in the field label. If you must place the "$" in the value you will have to use a textField, with something like:
load(
local!totalCost: 0,
a!textField(
label: "Total Cost",
labelPosition: "ABOVE",
value: "$" & if(isnull(local!totalCost),0,fixed(local!totalCost,2)),
saveInto: a!save(local!totalCost,todecimal(save!value)),
refreshAfter: "UNFOCUS",
required: true,
validations: {}
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data