# Configure multiple properties through binding!

**URL:** <https://forum.inductiveautomation.com/t/configure-multiple-properties-through-binding/80503>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 16, 2023, 12:42am UTC](https://forum.inductiveautomation.com/t/configure-multiple-properties-through-binding/80503 "2023-10-16T00:42:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ignitionSL](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ignitionSL](https://forum.inductiveautomation.com/u/ignitionSL)\
**Post date:** [October 16, 2023, 12:42am UTC](https://forum.inductiveautomation.com/t/configure-multiple-properties-through-binding/80503/1 "2023-10-16T00:42:48Z")

</div>

Can I configure multiple properties in the Perspective Property editor through a single query binding?  
I need to configure the properties of a marker on a map (data is transferred through a database) and need to create a new marker for every new entry to the database.

Please refer to the image

 ![fbfb](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/6/c6ba6962fe7aaca0fa1dfcbd0e843c37ced794b0.png)

---

<div class="post-metadata">

**Author:** ![william.bowen](https://avatars.discourse-cdn.com/v4/letter/w/8c91f0/32.png) [@william.bowen](https://forum.inductiveautomation.com/u/william.bowen)\
**Post date:** [October 16, 2023, 2:14am UTC](https://forum.inductiveautomation.com/t/configure-multiple-properties-through-binding/80503/2 "2023-10-16T02:14:03Z")

</div>

Yes, add the script transform to the binding that returns an array of marker dictionaries.  
So, loop through your data return from the query, construct the dictionary with the required properties and values and append that to the list. Then just return that list.

```auto
markers = []
for i in range(value.getRowCount()):
	markers.append({
	  "name": i,
	  "properties": {},
	  "enabled": True,
	  "lat": value.getValueAt(i,"column1"),
	  "lng": value.getValueAt(i,"column2"),
	  "opacity": 1,
	  "icon": {
	    "path": "material/location_on",
	    "color": "#4190F7",
	    "rotate": 0,
	    "size": {
	      "width": 36,
	      "height": 36
	    },
	    "style": {
	      "classes": ""
	    }
	  },
	  "event": {
	    "stopPropagation": False
	  },
	  "tooltip": {
	    "content": {
	      "text": "",
	      "view": {
	        "path": "",
	        "params": {}
	      }
	    },
	    "direction": "auto",
	    "permanent": False,
	    "sticky": False,
	    "opacity": 1
	  },
	  "popup": {
	    "enabled": False,
	    "content": {
	      "text": "",
	      "view": {
	        "path": "path/to/my/view",
	        "params": {
	        	"param1": "value1"
	        }
	      }
	    },
	    "width": {
	      "max": 300,
	      "min": 50
	    },
	    "height": {
	      "max": None
	    },
	    "pan": {
	      "auto": True
	    },
	    "closeButton": True,
	    "autoClose": True,
	    "closeOnEscapeKey": True,
	    "closeOnClick": None
	  }
	})
	
return markers

```

---

<div class="post-metadata">

**Author:** ![ignitionSL](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ignitionSL](https://forum.inductiveautomation.com/u/ignitionSL)\
**Post date:** [October 16, 2023, 3:26am UTC](https://forum.inductiveautomation.com/t/configure-multiple-properties-through-binding/80503/3 "2023-10-16T03:26:48Z")

</div>

I got this error.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/0/3096237604bb8acc5fde1be9b56cd3ba216523ac.png)

```
	markers = []
	for i in range(value.getRowCount()):
	markers.append({
		"name": "ll",
	    "properties": {},
	    "enabled": True,
	    "lat": value.getValueAt(i,"Latitude"),
	    "lng": value.getValueAt(i,"Longitude"),
	    "opacity": 1,
		    "icon": {
	        "path": "material/location_on",
		    "color": "#4190F7",
		    "rotate": 0,
			"size": {
			"width": 36,
			"height": 36
				},
			"style": {
			"classes": ""
			 }
			},
				"event": {
				"stopPropagation": False
				},
				
		 "tooltip": {
				"content": {
				"text": "",
						    "view": {
							"path": "",
							"params": {}
							},
				}
		"direction": "auto",
		"permanent": False,
		"sticky": False,
		"opacity": 1
		},
		
		"popup": {
		"enabled": False,
				"content": {
				"text": "",
				"view": {
				"path": "Objects/Map_Popup",
				"params": {
					"powerV": 500
					  }
					  }
					 },
			"width": {
			"max": 300,
			"min": 50
			},
			"height": {
			"max": None
			 },
			"pan": {
			 "auto": True
			},
		"closeButton": True,
		"autoClose": True,
		"closeOnEscapeKey": True,
		 "closeOnClick": None
	 	}
	})
			
return markers

```

---

<div class="post-metadata">

**Author:** ![amy.sudibyo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amy.sudibyo/32/38659_2.png) [@amy.sudibyo](https://forum.inductiveautomation.com/u/amy.sudibyo)\
**Post date:** [October 16, 2023, 3:34am UTC](https://forum.inductiveautomation.com/t/configure-multiple-properties-through-binding/80503/4 "2023-10-16T03:34:37Z")

</div>

Your first line below the 'for' statement is not indented like it is @william.bowen's example. Sometimes indentation can get messed up when copying and pasting code, so you'll want to always double check this as Python is particular about it.
