# How to Dynamically Move an Image Component Based on Database Values in Ignition Perspective?

**URL:** <https://forum.inductiveautomation.com/t/how-to-dynamically-move-an-image-component-based-on-database-values-in-ignition-perspective/95566>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 5, 2024, 4:24am UTC](https://forum.inductiveautomation.com/t/how-to-dynamically-move-an-image-component-based-on-database-values-in-ignition-perspective/95566 "2024-09-05T04:24:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Apxea](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Apxea](https://forum.inductiveautomation.com/u/Apxea)\
**Post date:** [September 5, 2024, 4:24am UTC](https://forum.inductiveautomation.com/t/how-to-dynamically-move-an-image-component-based-on-database-values-in-ignition-perspective/95566/1 "2024-09-05T04:24:24Z")

</div>

Hello Ignition Community,

I'm working on a project in **Ignition Perspective** where I need to dynamically move multiple image components based on X and Y coordinates retrieved from a database. I’m trying to avoid creating many tags for each component and would prefer to directly input the database values into each component's `x` and `y` position properties.

### Project Details:

- I am using a **Named Query** to fetch the latest `x_coordinate` and `y_coordinate` values from a database table.
- My goal is to dynamically update the position of several image components (`icon_operator` and others) based on the coordinates returned from the query.

### My Questions:

1. **Direct Binding to Database Values** : Is there a way to **directly input the database values** (from a Named Query or similar) into the `x` and `y` position properties of the components in Perspective without using tags or session properties? I would like to handle this programmatically since there will be many image components to update.
2. **System Functions Not Working in Perspective** : Functions like `system.gui.getWindow()` and `system.nav.openWindowInstance()` that I used in Vision aren't working in **Perspective**. What is the correct way to **access and update component properties** like `x` and `y` in Perspective?
3. **Path of Components in Perspective** : How do I get the **path of the components in Perspective** for scripting purposes? In Vision, I could use methods like `getComponent()` or `getRootContainer()`, but these do not seem to apply in Perspective. How do I reference components dynamically in Perspective to update their properties?

I'd appreciate any guidance or examples of how to achieve this in **Ignition Perspective** without creating many tags or relying heavily on session properties. I'm looking for an efficient way to move multiple image components dynamically based on real-time database updates.

Thank you!

---

<div class="post-metadata">

**Author:** ![Mitchell\_Dennis](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Mitchell\_Dennis](https://forum.inductiveautomation.com/u/Mitchell_Dennis)\
**Post date:** [September 9, 2024, 1:53am UTC](https://forum.inductiveautomation.com/t/how-to-dynamically-move-an-image-component-based-on-database-values-in-ignition-perspective/95566/2 "2024-09-09T01:53:43Z")

</div>

Use a map component or a view canvas
