Expand my Community achievements bar.

Calculations

Avatar

Level 1

I am creating a form to track mileage and one of the drop downs has the most common locations with the miles listed. I set a binding for the miles as well. What I would like to do is have another box that will have the binding number appear. The table below shows what I am looking for. What would I need to do so that the Miles column auto populates with what is in the destination binding? I also have the destination dropdown as a manual entry so users can add anything else.

Thank you for  your help

DestinationMilesTripsTotal Mileage
New York - 1 Mile111
Buffalo - 2 Miles212
1 Reply

Avatar

Level 6

You could use a java script on the change event that looks something like:


if (xfa.event.newText=="New York")

{Miles.rawValue="1"

}

if (xfa.event.newText=="Buffalo")

{Miles.rawValue="2"

}

you repeat this for each droplist value (don't know how many you have)

Then use a calculation script for the mutiplication