Totals of Repeating Group formulated from API

Dear All,

How can I obtain a grand total for the column ‘Current Value’ where this has been derived from ‘Holdings’ (in dB) x ‘current price’ (obtained from external API) ?

I know how to sum: all items of a RG but that only works if the data is in the dB, right?

How to achieve?

It works the same, you just get the data you want from the API then :count

Could you elaborate? If my Total box is outside the RG, what would the expression be? I don’t think I can use ‘Do a search for’ coz the value is not stored in the dB. Where would I start? My ‘Current Value’ field is derived from two hidden subtotals for Tokens 1 & 2 based on ‘Quantity’ in dB * API price.

Additionally, how could I sort the table by that column (Current Value)? Again, tricky coz it’s not held in the dB, so conditionally amending the data source doesn’t work…

Ok so I’ve successfully answered my own question thanks to @SerPounce Calculating grand totals in repeating group - #7 by SerPounce

But, can anyone help me on how to sort an RG by an input field in the RG (that’s not in the dB)…?

Hey @martin10 did you manage to find an answer on the sorting issue?

Hi, I’m pretty sure List Shifter plugin (Karmaware) will do both tasks I previously asked about.

Cheers @martin10, I had a look but doesn’t seem like it can? Correct me if I’m wrong but reading through the documentation seems to only sort by the column headings from the database the data is being sourced from?

List Shifter will sort any list how you wish - but it needs to be fed a list. So think in terms of creating a list, using data from dB or API, maybe using a custom state (?) and then shifting it through List Shifter. Give it a try, I think that will work. Forgive me if I’m wrong I’m no expert here.

1 Like

Cheers @martin10 will give that a go.