Count of column from List
Question

For reactive application am using listAppend, here I used the price after appending to list I required count of price column as Total price. How can I get this?

here total = sum(totalprice)


Regards 

Priyanka

Solution

Thanks marcio

Using this I got the answer. On every change this particular action it should execute. Previously I had done 1 mistake that only after inserting I used this action but it should be used for on change also.

Here I taken 1 local variable as total, for this I given Integer datatype and default value as 0.  After executing for loop I assigned local variable value to the Price.

Regards

Priyanka

Solution

Sorry, so forget the aggregate that I have before, have a look just on the loop, you will see that I am looping the list and sum the prices to give me the total. Dont forget to do for your use case

TotalPrice2+(List.Current.Sample_Product.Price*(the quantity of products))


sumprices.oml

If I understand it correctly, you can loop your list in a client action and sum the prices and in that client action, you have an output of the total price. You can even use this client action as a function or a simple action where when you add something to the list is going to calculate again the total price and assign to the variable that is on the inputs.

Regards,

Márcio

thank you marcio 

would you please give 1 example



You can do it like this, instead of looping you can call the aggregate in a data action and use the sum to sum all the prices that the user has assigned or you can change the filter for your use case.



Have a look at the OML

sumprices.oml

hello marcio

I used list, in that I require count

Solution

Sorry, so forget the aggregate that I have before, have a look just on the loop, you will see that I am looping the list and sum the prices to give me the total. Dont forget to do for your use case

TotalPrice2+(List.Current.Sample_Product.Price*(the quantity of products))


sumprices.oml

Solution

Thanks marcio

Using this I got the answer. On every change this particular action it should execute. Previously I had done 1 mistake that only after inserting I used this action but it should be used for on change also.

Here I taken 1 local variable as total, for this I given Integer datatype and default value as 0.  After executing for loop I assigned local variable value to the Price.

Regards

Priyanka

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.