Using Map control to capture locations
You may want to build forms to display a store’s location or indicate a delivery address and other such scenarios. To be able to add the map functionality to your forms, the no code platform has the Map Control with features to zoom in and out, search, mark a location, and even to capture the user’s location coordinates.
When creating a form having a map control you will need to add the Map control to the form, add a workflow to define the actions, and link the workflow to the action button to store the details to the sheet as required.
Let us first have a look at how to use the map control.
Let us look at an example to use a map control for delivering the product and storing the exact location. Create a sheet named Prod_delivery_map with the columns for Customer name and Delivery location . Let us create the form with the controls for the above columns and a Submit button. We will also create another sheet Locations_sheets to store a few locations that would be bound to the map control and displayed on the map. Let us understand the process to add the map control to the Forms.
Adding form controls
Let us add a Text control for the Customer name and Map Control for the Delivery location . Add a Submit button to store the details on the sheet . When you add a map control you can bind it to another sheet to retrieve the columns containing the coordinates for the locations that can be reflected on the control.
For this form let us bind the Locations_sheet to the control to display the locations. Select the map control and go to F options ( Bind data from ) > Options > Sheet. Select the respective sheet and from the list of columns select the respective Geolocation and Location name columns and Save . Now check the Formula option , a LOOKUP formula has been created. In this formula, it is important to add the GeoCoordinates column first and the Locations column next. Save and validate to ensure that the formula gives the desired result.
Now let us set the properties for the Map control to enable the user to select a location that can be stored to a sheet. Assign an appropriate label for the control. Now if you want to prompt the user to indicate the selected location you can use the Marker Text on the map control. Under Properties, first, you need to Enable > Allow user to choose location and now you can set the value under User Marker Text .
With the Allow user to choose location property enabled, the users can click to select the location on the map . It is necessary to click and select the location to be stored. This location is the geo-location that would be stored to the sheet and which can be used on other map controls as required.
Now to be able to submit the data to your sheet, you need to add a workflow to this form. Select Workflow from the menu and click + (add) icon under the current Screen to add the workflow. Name it as Map_workflow. It is important that the workflow is created under the screen where it is to be applied. Open the workflow to configure the tasks of the workflow for submitting information.
Select the task as Update Sheet and click Continue. Add a Task name and description (optional) and click Next. Here specify the sheet where the records are to be inserted and select What to do as Insert Record .
Now link the columns of the sheet to the controls, under Insert Data , type the control name, that is available as suggestions representing the Uniquename for the control. The Uniquename is a unique identifier for the control and is auto-generated, based on the label name of the control.
Optionally you can select it from the Tasks option in the F option. To add a control, Click F and select Tasks > Initiated > Control’s Uniquename. Click Done after all columns are added. Your workflow for inserting records is now ready.
Linking workflow to the Submit action
You now need to link the Workflow to the Submit Button . In the properties of the Submit button, click Select Workflow, and link the Map_workflow workflow that is created in the previous step. Now you can set the properties as required. Set the action for successful submission as required. For the sake of this example, set it as a Popup Message.
Now you can take a preview of the form. You can see the functionalities to zoom in and zoom out. You can also search for a location using the Search option. It is necessary to click to select a specific location. You can see the Marker Text that you have set when you select a location. Now Submit the form.
The coordinates of the selected location are stored to the sheet. You can now open the sheet to check the details stored.
Once you have finalized the overall form and are satisfied with its look and feel, you can Publish it so that it is accessible for organizational or public access as per your need. So you see how easy and quick it is to create your own forms to use the map control to capture locations using our low code platform.