Embedded Map {{Clicked Marker }} unable to pass row into form - Update Marker Position #14061
-
Hi, still new to this, so please bear with me. I'm trying to build an asset managment app, where the location of the asset has to be quite precise. I've built an onboarding page where a client enters their details and can set the location of the asset. Now i'm trying to build the opertor screen (/client_tasks). I've used app state to filter between 3 tables and am trying to use app state to edit the position of the asset. I have it set so that when you click the marker on the map, it opens a modal with a map and a form where the old and new co-ordinates are to be dispplayed, and sets the app state. I'm having trouble using the {{Clicked Marker._id }} binding and getting it to sucessfully pass the co-ordinates of the corresponding row to the form fields. I've tried row_id, the column name (Lat) as well. I've tried it without the modal as well and cant seem to get it to work. Attached below is the app that i'm working on |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @LucianHorrobin, this is a cool use for Budibase! Having looked into what you're working on, I think on your Map (in the page) you should set your Update State action to And then pass this value into the Map_Modal_DP data provider so that only that clicked marker is displayed on the map to be sure you're updating the location of the correct asset. I've also swapped out your form for a Multi-Step Form Block set to update the row of the clicked asset. Clicking "Create New Marker" on the map passes these values into the fields, and the form saves them, closes the modal, and refreshes the Data Providers on the screen, so you can see the new location of the asset. Here's the app-export to have a closer look. |
Beta Was this translation helpful? Give feedback.
Hey @LucianHorrobin, this is a cool use for Budibase!
Having looked into what you're working on, I think on your Map (in the page) you should set your Update State action to
Clicked_Marker_id
= {{ Clicked marker._id }}And then pass this value into the Map_Modal_DP data provider so that only that clicked marker is displayed on the map to be sure you're updating the location of the correct asset.
I've also swapped out your form for a Multi-Step Form Block set to update the row of the clicked asset. Clicking "Create New Marker" on the map passes these values into the fields, and the form saves them, closes the modal, and refreshes the Data Providers on the screen, so you can see the new loc…