I’ve been scratching my head on this one, my needs are quite simple, all I need to do is show a SUM of prices that are listed in a repeater bullet list, no matter what I try I just cant get it to show a SUM total. The repeat region data is taken from a db join that pulls the ‘PricingPrice’ data from an array inside a bookings table.
I’m not sure I can do that for this query, I have two tables ‘bookings’ and ‘valetpricelist’ the valetpricelist.PricingID is taken from an array in the bookings table in the column BookingServicesRequired (example: 71,77,92) then iterated through the bullet list using the scServicesList.data.queryServices as the filter.
the scServicesList.data.queryServices query only contains the aggregate of the list of all prices, and not the ones selected by the dmx-show in the bullet list.
How about this, you create an App Connect variable called “servicesSum”
And then, on server connect scServicesList success, you run an App Flow, and inside it you have a Repeat to iterate scServicesList.data.queryServices, and for each value you increment servicesSum.value (make sure to convert the current price to a Number, as it’s probably a string by default)
And then in the HTML you just put an App Connect Binding for the variable servicesSum, like this:
You, my friend, are a genius - there’s no way at all I’d have gotten that one. Thank you so much for your help, its greatly appreciated. Hopefully I’ll be able to pay some Karma forward by helping others whenever I can.
Thank you also to all other contributors, you all provided some excellent answers which will definitely help in the future. @Apple your flow suggestion is stored in my memory bank for future usage