# Indirect tag auto-refresh issue

**URL:** <https://forum.inductiveautomation.com/t/indirect-tag-auto-refresh-issue/103751>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 16, 2025, 3:12pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-auto-refresh-issue/103751 "2025-03-16T15:12:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fe\_sha](https://avatars.discourse-cdn.com/v4/letter/f/a88e57/32.png) [@fe\_sha](https://forum.inductiveautomation.com/u/fe_sha)\
**Post date:** [March 16, 2025, 3:12pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-auto-refresh-issue/103751/1 "2025-03-16T15:12:34Z")

</div>

Hi everyone,

I'm working on **Ignition Perspective** where a **table is bound to an indirect PLC tag** based on a dropdown selection. The table **displays recipe data** from an array of PLC tags, and users can edit values directly in the table.

The issue is that **after editing a cell, the PLC tag updates correctly, but the table does not refresh automatically.** The updated value only appears after manually reselecting the dropdown or refreshing the page.

**Setup Details**

- **Indirect Tag Binding** : `[default]RECIPE_MANAGE/RECIPE_MANAGE_{recipeIndex}_{rowIndex}_/{columnName}`
- **Cell Edit Event (`onEditCellCommit`)**:
- Writes the updated value to the PLC tag using `system.tag.writeBlocking()`.
- Sends a message (`system.perspective.sendMessage("RefreshRecipeTable", scope="session")`) to refresh the table.

### **What I’ve Tried**

✅ **Confirmed the tag updates correctly in Tag Browser** after editing the table.  
✅ **Tried `refreshBinding("props.data")` in a message handler** but still doesn’t auto-refresh.  
✅ **Forced dropdown selection reset (`recipeIndex = -1` → restore)** but no effect.  
✅ **Checked logs (`system.util.getLogger("RecipeDebug")`)** → Shows that the tag write was successful.

### **❓ Question: How Can I Force the Table to Refresh Automatically?**

- Does Refresh function worked for Indirect Tag?
- Should I **trigger a different property change** instead of just `recipeIndex`?. I can refresh the table by selecting different value on dropdown and switch it back but i need it to auto-refresh.
- Is there another way to **force an update on the table**?

Thank you for your concern.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 16, 2025, 3:21pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-auto-refresh-issue/103751/2 "2025-03-16T15:21:38Z")

</div>

The `.refreshBinding()` on the table in a message handler should have worked. Show your code for that.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 16, 2025, 3:22pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-auto-refresh-issue/103751/3 "2025-03-16T15:22:16Z")

</div>

> `refreshBinding("props.data")`

[Perspective Component Methods | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/scripting-in-perspective/perspective-component-methods#refreshing-bindings) says that that should be  
`self.refreshBinding("props.data")`  
assuming the message handler is on the table component.

---

<div class="post-metadata">

**Author:** ![fe\_sha](https://avatars.discourse-cdn.com/v4/letter/f/a88e57/32.png) [@fe\_sha](https://forum.inductiveautomation.com/u/fe_sha)\
**Post date:** [March 17, 2025, 2:00am UTC](https://forum.inductiveautomation.com/t/indirect-tag-auto-refresh-issue/103751/4 "2025-03-17T02:00:06Z")

</div>

> [@pturmel](#):
>
> The `.refreshBinding()` on the table in a message handler should have worked. Show your code for that.

A dropdown to select the recipe and save the selected value:_recipeIndex_ to view parameter.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/3/834eeff65c953edfdaca1ac2e4c50d42be024f8b.png)

OnEditCommit Script: Update the table value to Tag Browser and refresh the binding.

```python
def runAction(self, event):
    try:
        # Ensure recipe index is an integer
        recipe_index = int(self.view.params.recipeIndex)

        # Get the edited value, row number, and column name
        rowIndex = event.row
        columnName = event.column
        newValue = event.value

        # Mapping table columns to PLC tag names
        tag_mapping = {
            "Duration": "Duration",
            "Concentrate": "Concentrate",
            "Scatter": "Scatter",
            "Upper_Pump": "Upper_Pump",
            "Lower_Pump": "Lower_Pump",
            "Is_Cycle": "Is_Cycle",
            "Cycle_Mode": "Cycle_Mode"
        }

        # Check if the edited column is in the mapping
        if columnName in tag_mapping:
            tag_path = "[default]RECIPE_MANAGE/RECIPE_MANAGE_" + str(recipe_index) + "_" + str(rowIndex) + "_/" + tag_mapping[columnName]

            # Debugging log before writing
            logger = system.util.getLogger("RecipeDebug")
            logger.info("Attempting to write: " + tag_path + " = " + str(newValue))

            # Write the new value to the PLC tag
            system.tag.writeBlocking([tag_path], [newValue])
            logger.info("✅ Successfully wrote to tag: " + tag_path + " = " + str(newValue))

            # 🔄 **Refresh the table after editing**
            system.perspective.sendMessage("RefreshRecipeTable", scope="page")
            logger.info("🔄 Refreshing table data binding")

    except Exception as e:
        system.util.getLogger("RecipeDebug").error("❌ Error in onEditCellCommit: " + str(e))

```

Message Handler on the table component

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/9/9999fc475a80d6d47201fdc99631806c249f13c2.png)

The table can display the dataset and update the cell value to PLC but it won't refresh automatically. I can only select another dropdown value and reselect the original value to refresh the table.  
Anything i can do to refresh the Indirect Tag?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 17, 2025, 9:23am UTC](https://forum.inductiveautomation.com/t/indirect-tag-auto-refresh-issue/103751/5 "2025-03-17T09:23:40Z")

</div>

> a **table is bound to an indirect PLC tag**

Your screengrab in post #3 shows that you are passing this as a view parameter `{view.params.recipeIndex}` which isn't the same thing. View parameters are only read once on view load.

You need to find another way to pass the value into the view. This could be a `session.custom` variable.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 17, 2025, 12:10pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-auto-refresh-issue/103751/6 "2025-03-17T12:10:34Z")

</div>

I think the issue is that you aren't changing the result of the indirect tag binding, so there's no change to make the transform run. You should move all of that transform code into a project library script function, and use `runScript()` to call it. Pass the recipe index into the function as an argument.

`runScript()` is faster than a transform, too.
