Looking to see if this is possible. I have a simple form with user input fields for currency amounts. For the sake of example let's say I have (field1 + field2) / 3 = field3 where fields 1 and 2 are user input and field3 is based on the set expression rule of field1 + field2. What I really want is for my front end user to see the fields they input populate as $123,456.78 not 123456.78. Additionally, my form has division based math behind some of the fields and I want to force the result to 2 decimal places. I know that if set as a currency field using masking formatting I can get to this as a confiform record, but really need to display this at face value in the form. I've had some marginal success using JS but this ultimately breaks any math driven fields. Is this possible? Thanks!
Take a look at this screencast, it uses ConfiForms Field Definition Rules macro to calculate the expression online and sets it on a readonly field in a form...
The expression I have is
field3=(CONCAT("$", FORMATNUMBER(([entry.field1] + [entry.field2])/3,"###,###.00")))
Hope this helps
Sorry Alex, I think I phrased that poorly.
So how would I plug that logic into a simple user input field that is void of calculations? In my example of field1 + field2 = field3, let's say I wanted to "display" field1 and 2 as $123,456.78 while still being able to facilitate the calculation to field3?
After looking into it a bit, I don't think that setting a field to display as "currency" will work with back end calculations being set.
That being said, I do have a follow up question as I'm beginning to plug in some logic to do mat operations on the backend.
I'm attempting to use an IF statement to "set expression" for another field.
Here's a couple of examples I've attempted. Also all fields are set to numeric and "var1" is the result of a "set expression" rule to calculate itself.
So this works:
Field Name - newmtgflex,dischargeamt
Condition - !newmtgflex:[empty] AND !dischargeamt:[empty]
Values to set - var1=([entry.newmtgflex]/[entry.dischargeamt])
This doesn't work
Field Name - newmtgflex,dischargeamt,var1,penaltypaid
Condition - !newmtgflex:[empty] AND !dischargeamt:[empty] AND !var1:[empty] AND !penaltypaid:[empty]
Values to set - var2=IF([entry.var1]:<=1,([entry.newmtgflex]/[entry.dischargeamt])*[entry.penaltypaid],[entry.penaltypaid])
I'm probably missing something obvious, let me know if you can help me out, thanks!
I had thought about this over the weekend and thought that it was something that I had missed with the quotes around the variables. Tested and works, thank you so much Alex.
Upping the difficulty level, I imagine that a nested IF statement would follow the same logic?
Calling all Confluence Cloud Admins! We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events