Get value from selected dependency
-
Hello there. Thank you for this great plugin.
I’m building a revenue estimation form for car rental (people lists their own cars for rental). The calculation is based on car’s age, brand and model. I have a Brands dropdown with 26 entries, each with it’s own dependency Model dropdown (so I have 26 more dropdowns, only one being visible based on the Brand selected). Each Model dropdown have a different number of entries, each with it’s own value. The calculation needs to take into consideration the car’s age (under 3 years, over 3 years and over 5 years).
I’ve come up with this formula (more fields are needed for final calculation, but I’ll deal with that later) that works well with one model(fieldname8) based on vehicle’s age (fieldname38).
((YEAR(TODAY())) – fieldname38) <= 3 ? (fieldname8*15*0.6) : (((YEAR(TODAY())) – fieldname38) <= 5 ? ((fieldname8*15*0.6)*0.75) : ‘Car is too old’);
Now my problem is that I don’t know what would be the most efficient way of doing this for every other 25 fields. I’m hesitant in using the same formula for each of other Brand, because it will become a monster very fast.
Another idea I had would be to set Brand’s value based on selected Model’s value. Is there a way of doing this? I’ve tried adding Model’s fieldname## as Brand value, but it doesn’t work. What can I use in Brand’s value field so it takes the value of it’s dependency?
Or, if someone have a better way of doing this, I’m open to suggestions.
Thank you.
The page I need help with: [log in to see the link]
- The topic ‘Get value from selected dependency’ is closed to new replies.