You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi Team,
I have set below structure for users to input several fields, and provide a total using Field Definition Rules with "set expression" to calculate total. The total can be successfully calculated in the beginning.
However, the problem is that if user updates any field with "backspace" instead of input "0," the "set expression" rule seems can not work and will return below message:
"COM.VERTUNA.CONFLUENCE.PLUGINS.CONFIFORMS.UTIL.EXPRESSION$EXPRESSIONEXCEPTION: TOO MANY OPERATORS OR FUNCTIONS AT: +"
It is weird because if user input "0," then the total can be calculated correctly. I have tested multiple times, and seems only "backspace" would cause the calculation fail.
Could you advise?
Ps. The structure:
- Field A: $user input amount
- Field B: $user input amount
- Fied C: read-only to display calculated result
- Rule 1 for Field A (calculate total when there is input):
condition = empty
action = set expression
value = Field C = [entry.Field A] + [entry.Field B]
- Rule 2 for Field A (put "0" when there is no input):
condition = empty
action = set value if empty
value = Field A = 0
Rules on Field B is similar to on Field A.
Hi @Alice Liu and welcome to this community
Fix your expression to handle the empty value
FieldC=ZEROIFEMPTY("[entry.FieldA]") + ZEROIFEMPTY("[entry.FieldB]")
Alex
Hi Alex,
Thanks for the greeting and prompt reply!
I may not express my question clearly, but I did not set empty value rule on Field C.
The empty value "0" rule is set on Field A and Field B.
And my problem is that if in the beginning user input:
Field A = 100
Field B = 100
Then Field C can correctly display total 200.
But if then user use "backspace" to eliminate Field A's or Field B's value, then Field C will show the COM.VERTUNA message stated in my above post.
i.e. if afterwards user input:
Field A = 100 >> empty (using "backspace" instead of input "0")
Field B = 100
Field C = COM.VERTUNA.CONFLUENCE.PLUGINS.CONFIFORMS.UTIL.EXPRESSION$EXPRESSIONEXCEPTION: TOO MANY OPERATORS OR FUNCTIONS AT: +
But if user input Field A = 100 >> 0, then Field C will show 200.
Hope this example explain better. Could you help to see what I can change to solve this problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, and that is exactly what I was trying to help you with...
Let me try with the demo this time, I hope it helps
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
The demo is very clear and helpful. I tried on my case and the problem is solved.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.