Calculation in App Studio

Howdy EpiUsers! :cowboy_hat_face:

Has anybody got the App Studio Calculation widget to work?
Or know of a better way I should do my calculation? Maybe a function?

I’m trying to calculate each order-line’s weight.

At first I thought it was working, it would calculate the first line correctly (part weight * line qty). But if I try to change the qty the value doesn’t update. And if I enter more lines, they all get the same value.

I dunno why, but I really love those graphs. They’re so… zazzy. :sweat_smile:

Any who, you’ll probably need to use a dataview-condition widget to loop through each line and do that calculation in the iteration event.

1 Like

Thank you! I was feelin artsy today :art:

I will give the dataview-condition widget loop approach a try. Thanks Hannah!

Any idea what I’m doing wrong? I may be totally missing the mark here.
This is my interpretation of your explanation :sweat_smile:

I was trying something generic like OrderDtl.OpenLine=true as a filter to get any rows to the calculation step, but it doesn’t appear any are making it that far.

I usually do 1=1 to get all lines.

1 Like

Wouldn’t you still need the EpBinding of the calculation widget to go to OrderDtl.LineWeight_c ?

How does the end result end up in your OrderDtl dataview?

The match table is supposed to get merged with the OG table for one, super-awesome table of fun.

1 Like

Ignore, bad post.

I added conditional dialogs which were giving me nothing, but I added curly bracket around my data view {OrderDtl}, and at least now it says ‘no match’ :upside_down_face:
image

Any other thoughts on what I can try next?
I can see the row data in the function in dev tools. Within ds, there’s an OrderDtl table with at least one row. Kinda stumped on how to access it tho :thinking:

Not sure why my earlier attempt wasn’t working… but this worked!

Dataview Condition

It makes a subset of records based the criteria you provide. I think the word matches is special? It says the system generates a temporary data view named matches, containing your subset of records.

Then I was able to run my calculation on the subset, and just like Hannah said the result was automatically merged back into the original dataview. Magic! :sparkles:
image

dataview-condition, pretty dang cool!
Thanks again @hmwillett !

2 Likes

As special as I am (not) :rofl:
It can be whatever you wanna call it.

1 Like