Hi all

I've been trying for two days with no success to create a recursive function to calculate a final discount given the list of discounts for a certain product.

For example: product A which price is 100 has a 50 + 20 + 10 discount, then

First iteration = 100 * (1 - (50 / 100)) = 50 -----> First Discount
Second iteration = 50 * (1 - (20 / 100)) = 40 -----> Second Discount
Third iteration = 40 * (1 - (10 / 100)) = 36 -----> Third Discount


What I want to do is to create a recursive function so I can calculate the nth iteration of the discount.

So far, I've created a list of discount values using Substitute (Discounts, "+", "�") and I know that I know that have to use a Case statement for the function stop working but all the attempts I've done didn't work at all.

Can anyone shed some light into this darkness? :).

TIA

Saludos

Ibrahim Bittar
Associate Member, FileMaker Solutions Alliance
http://www.eikonsys.com


-- To unsubscribe: send an email to <[EMAIL PROTECTED]> FMPexperts is hosted by Ironclad Networks <http://www.ironclad.net.au/>

Reply via email to