Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,958
Community Members
 
Community Events
184
Community Groups

Confiform "Set expression" does not work when field is updated by backspace

Edited

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.

1 answer

1 accepted

2 votes
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 06, 2023

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?

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 07, 2023

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

http://recordit.co/nAxvkpVRpp

Alex

Hi Alex,

The demo is very clear and helpful. I tried on my case and the problem is solved.

Thank you!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events