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

confiForms ValueView - Wrong calculation

Michael Küng May 4, 2023

Hey,

I have an easy calculation within a ValueView.

<ac:parameter ac:name="fieldName">Required:(20-([entry.actual]))</ac:parameter>

The calculation is 20 minus the sum of the field actual by ([entry.actual]).

It works if I have only one entry, eg. one entry with a field value of 4, iI got 16 with the term above. If I have two entries, eg. with field values 4 and 2 =6, I got a result of 34 instead of 14.

Is there a fault in my thinking or is this a bug?

Thanks in advance.

1 answer

1 accepted

1 vote
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 5, 2023

Hi @Michael Küng 

Calculation are made PER ROW, and then aggregated by "key" (summed up)

Alex

Michael Küng May 5, 2023

Okay, so...in my example: (20-4)+(20-2) = 34

And I guess there is no way, to calculate with the "summed up" value?

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 5, 2023

Well, there is... but it is a bit weird :-)

Required:(20 [entry.id.queryAndSet(form:@self;*;actual.prepend(-)).split(,).join()])

Little demo:

http://recordit.co/URFHYXhVR6

PS, my ValueView is set to LIMIT itself to 1 record 

limit.png

Alex 

Michael Küng May 5, 2023

What the hell?! You are a genius! Thanks

I feel like I was dived deep into a rabbit hole,. Don't got the solution at all, but it works :D

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 5, 2023

Yes, use with caution.. it is a bit weird expression :-)

Like Michael Küng likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events