# Dynamically passing Named Queries information into a geoJSON file

**URL:** <https://forum.inductiveautomation.com/t/dynamically-passing-named-queries-information-into-a-geojson-file/75218>\
**Category:** Ignition\
**Tags:** perspective, namedqueries, scripting, database\
**Created:** [June 19, 2023, 3:05pm UTC](https://forum.inductiveautomation.com/t/dynamically-passing-named-queries-information-into-a-geojson-file/75218 "2023-06-19T15:05:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Cameron\_Nickle](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Cameron\_Nickle](https://forum.inductiveautomation.com/u/Cameron_Nickle)\
**Post date:** [June 29, 2023, 3:44pm UTC](https://forum.inductiveautomation.com/t/dynamically-passing-named-queries-information-into-a-geojson-file/75218/2 "2023-06-29T15:44:32Z")

</div>

I found a way to do this:

Step 1: follow all the steps on [Perspective Map - Adding GeoJSON Shapes - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Perspective+Map+-+Adding+GeoJSON+Shapes) but be sure to leave the array that contains all the Longitude and Latitude coordinates blank

Step 2: once you've bound the file and all the drop downs are in the correct spots remove the binding to the webdev file

Step 3: drill down till you find the ''Coordinates tab" and perform a named query binding on it to return your geolocation data of interest and be sure the return type is set to data-set

Step 4: Make a scripting transform on the coordinate binding and read the following posts

> [@Convesion of a JSON return type via a scripting transform](https://forum.inductiveautomation.com/t/convesion-of-a-json-return-type-via-a-scripting-transform/75482/3):
>
> Sounds like dataset row/column subscripting. Just use dataset return type for the named query, and jsonify it in a transform. Going from dataset to json is "lossy", so should only be done at the point where Perspective needs it. You might find this helpful:

> [@Conversion from an array of python dictionaries to an array of arrays using transform](https://forum.inductiveautomation.com/t/conversion-from-an-array-of-python-dictionaries-to-an-array-of-arrays-using-transform/75600):
>
> Hi all, I'm currently working on trying to take a return type of an array of python dictionaries to and array of arrays using transforms. However, I have thus far been unsuccessful. Does anyone know a way to do this using any of the base 4 transforms? [image] Thank you, Cam

As of right now this seems to work. If there is any change or if I find a better way I'll update this post

---

_[View the full topic](https://forum.inductiveautomation.com/t/dynamically-passing-named-queries-information-into-a-geojson-file/75218)._
