Hi, me again
is there a way to do math on the App side?
Basically I show a customer an estimated price based on their transport booking. Pricing is volume/weight based (which ever is greatest). So, for exampe I might charge 1.90 per kg and 95 per m3.
A client books on 5m3 that weighs 500kg.
so in weight that is 950 and in volume it is 450. I need to show to the client the greater value.
I have the values pulled in from the DB.
and I can do basic maths on it like this:
(weight price)
{{sc_UserJobSummary.data.q_UserJob_sel[0].kg_price_deliverydate * sc_UserJobSummary.data.q_UserJob_sel[0].weight}}
(volume price)
{{sc_UserJobSummary.data.q_UserJob_sel[0].m3_price_deliverydate * sc_UserJobSummary.data.q_UserJob_sel[0].volume}}
but I only want to show the client the higher price
so something like an if xxx >= yyy show xxx else yyy
cant figure out how I would do this in wappler. Hope this makes some sense. Dont want to start trying to hack it in if it is possible in wappler
Thanks
Darren
Last updated: