This topic is locked
[SOLVED]

 Help with lookup option

11/15/2019 7:16:52 AM
PHPRunner General questions
B
bcritchley author

I am thinking about creating a mileage reimbursement form for my school system. Was curious if anyone could make some recommendation on how I might setup a calculated field based on what the users picks from two lists. I Plan to have one drop down pick list that has the start location which would be one of our 17 schools. The second pick list would be the same list but would be the destination. I have all of the possible combination already, example building A to building B is 2.5 miles; building A to building C is 3.2 miles etc....I would also like this to be a repeating field on the form so that they could enter at least 20 or 25 entries before having to submit the form

Any suggestions on how to, or the best method to go about configuring it so the combination of what is picked in the 2 fields can pull from something to put the miles traveled into a distance field?

Sergey Kornilov admin 11/18/2019

Since you are going to have multiple origin-destination pairs I recommend using the master-details relationship. You can add/edit master and details on the same page.
In regards to the calculation itself - it will be something totally custom. Check this article for inspiration though:

https://xlinesoft.com/phprunner/docs/show_order_total_on_the_edit_page_as_the_details_table_is_updated.htm

B
bcritchley author 11/21/2019



Since you are going to have multiple origin-destination pairs I recommend using the master-details relationship. You can add/edit master and details on the same page.
In regards to the calculation itself - it will be something totally custom. Check this article for inspiration though:

https://xlinesoft.com/phprunner/docs/show_order_total_on_the_edit_page_as_the_details_table_is_updated.htm


Thank you for the starting point, much appreciated.