Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

formula field scoring

Kuanysh Belsariyev
Contributor
October 3, 2024

@Alex Medved _ConfiForms_ Hello! 

I need to set up value scoring.

I use the FORMULA field type.

After saving the form, everything is displayed correctly

But, I need the sum of all fields to be displayed before saving

For example: 
Here I want to see the result 

scoring.png

I use expression  ([entry.s11]+[entry.s22])+([entry.s33]+[entry.s44])+([entry.s55]+[entry.s66])

 

how to make calculation before saving the form?

1 answer

1 accepted

2 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
October 3, 2024

This usually happens when the references to field values, such as [entry.s11] result in empty values

 

Consider using ZEROIFEMPTY wrapping function

https://wiki.vertuna.com/display/CONFIFORMS/Supported+math+operators%2C+formulas+and+functions

 

(ZEROIFEMPTY("[entry.s11]") + ZEROIFEMPTY("[entry.s22]") + ZEROIFEMPTY("[entry.s33]") + ZEROIFEMPTY("[entry.s44]") + ZEROIFEMPTY("[entry.s55]") + ZEROIFEMPTY("[entry.s66]"))

Alex

Alex Medved _ConfiForms_
Community Champion
October 3, 2024

how to make calculation before saving the form?

Formula is calculated on submit

Use the "Set expression" rule instead, and not the formula field, but something like a read-only field

Like Kuanysh Belsariyev likes this
Kuanysh Belsariyev
Contributor
October 4, 2024

@Alex Medved _ConfiForms_ thank you! Now it works well. I did it by "set expression"

In this scoring i have few statuses that depends on points

for example

<=5 -"take on the task"
<21 - "send to backlog"

<41 - "refine the idea"

So, how can I set up to automatically choose status that depend on points? Before saving the form 

Alex Medved _ConfiForms_
Community Champion
October 4, 2024

Add 3 more rules with a “set value” as an action that execute for each condition, all bounded to the field that you set with a “set expression” rule

Kuanysh Belsariyev
Contributor
October 4, 2024

@Alex Medved _ConfiForms_ which condition should I use? 

s111 is the readonly field 

I need to set if the number is less than or equal to 5 to set the status to number 1
Screenshot 2024-10-04 180831.png

Screenshot 2024-10-04 181226.png

Alex Medved _ConfiForms_
Community Champion
October 4, 2024

Interesting namig convention, but yes… that’s about right

I would adjust the condition to be as follows though

s111:<=5
Like Kuanysh Belsariyev likes this
Kuanysh Belsariyev
Contributor
October 6, 2024

thank you
you saved me again ^__^

Alex Medved _ConfiForms_
Community Champion
October 6, 2024

No problem. Happy to help 

Kuanysh Belsariyev
Contributor
October 8, 2024

@Alex Medved _ConfiForms_ Hello! The last question :) 
Everything works perfect.
But when I edit saved entries, the total value multiplies by 6, which leads to incorrect status setting
Screenshot 2024-10-09 113541.png

Screenshot 2024-10-09 113750.png

 

Alex Medved _ConfiForms_
Community Champion
October 8, 2024

Make the rules to run ONLY on "user action"

You can see what happens by enabling the "debug mode" in the ConfiForms Registrations Control macro (will show you which rules are triggered.. and when)

Like Kuanysh Belsariyev likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events