Hi everyone.
I'm making an Project management app where you can choose and add site locations and add daily tasks to these.
In the daily activity view, I can add start and end times, date, explanation of the work done etc.
I can also choose my start address, location address (this is automatic, based on the info of the worksite) and my return address. Usually start and return address is my home, but these might also be from or to another job site.
Problem follows:
Both start and return address should have dropdown lists that I can edit, if necessary. These should also be in address form, so when typing a new address, it fetches it from Google maps. These both I have done already with this: column type: address, auto compute - suggested value: worksite[address].
But this previous method gives a problem: In the droppdown list it shows the addresses of the worksites (obviously because of the "worksite[address]"). What I would like the dropdown list to show is the actual name of the worksite, and when clicking it adds its address.
This can be done in two different boxes, from first you choose the worksite by its name using the same suggested value (worksite[address]) and then you have another box that autocomputes the address from the previous box using LOOKUP([first box], "siteinfo sheet", "worksite", "address") in initial value.
In a nutshell my question is this: Can you have a box that has a suggested values list that shows an list ref by column, and when choosing it actually adds a info from another column in that same row?
Solved! Go to Solution.
@Olmis wrote:
This can be done in two different boxes, from first you choose the worksite by its name using the same suggested value (worksite[address]) and then you have another box that autocomputes the address from the previous box using LOOKUP([first box], "siteinfo sheet", "worksite", "address") in initial value.
I think you are on the right track. You could slightly modify the above approach as follows.
In the first box's continue to have the suggested value that gives the worksite name.
Then you could have an event action on form save that again sets the [First Box] value with the expression
LOOKUP([first box], "siteinfo sheet", "worksite", "address") in initial value.
The above approach of using event action will ensure you do not need the second box.
Actions: The Essentials - AppSheet Help
@Olmis wrote:
This can be done in two different boxes, from first you choose the worksite by its name using the same suggested value (worksite[address]) and then you have another box that autocomputes the address from the previous box using LOOKUP([first box], "siteinfo sheet", "worksite", "address") in initial value.
I think you are on the right track. You could slightly modify the above approach as follows.
In the first box's continue to have the suggested value that gives the worksite name.
Then you could have an event action on form save that again sets the [First Box] value with the expression
LOOKUP([first box], "siteinfo sheet", "worksite", "address") in initial value.
The above approach of using event action will ensure you do not need the second box.
Actions: The Essentials - AppSheet Help
Thank you, worked perfectly.
Actually with that idea I was able to do another task also:
When calculating kilometers from odometer entry, I wanted to make it possible so that app calculates one of three entries, either odometer start reading, odometer end reading or driven kilometers by entering only two of these.
With event action, it was super easy and extremely good calculation to have in case you forgot to enter start reading or one of the others. Didn't manage to do it with formulas, always got the circulation error.
You are welcome. Nice to know you already found more use cases for event actions. Best wishes for your app building.
User | Count |
---|---|
34 | |
11 | |
3 | |
2 | |
2 |