# Manual tag writeback

**URL:** <https://forum.inductiveautomation.com/t/manual-tag-writeback/8409>\
**Category:** Ignition\
**Created:** [May 3, 2014, 6:29pm UTC](https://forum.inductiveautomation.com/t/manual-tag-writeback/8409 "2014-05-03T18:29:03Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [May 3, 2014, 6:29pm UTC](https://forum.inductiveautomation.com/t/manual-tag-writeback/8409/1 "2014-05-03T18:29:03Z")

</div>

I have an old script that I used in FPMI days that I’d like to revive, and am having a problem. The script allowed me to have a dialog-like window of numeric entries, drop-downs, etc, all with one-way bindings to various tags. With the one-way bindings, nothing would get written to the server until clicking a ‘Save’ button. The save button would execute a script that looked up all of the tag bindings in the window, and for the typical value properties, trigger a writeback for each. (And then close the window).

Here’s the script:

```auto
def tagWriteBack(event):
	import fpmi
	pa = fpmi.gui.getParentWindow(event).propertyAdapters
	for k in pa.keySet():
		if k.propertyName in ('controlValue','date','dateValue','doubleValue','endDate','floatValue','intValue','latchedDate','longValue','selected','selectedIndex','selectedValue','selectedStringValue','startDate','text','value'):
			v = pa[k]
			if v.class.simpleName in ('SimpleBoundTagAdapter','IndirectTagBindingAdapter'):
				try:
					k.component.dataQuality = 700
				except:
					pass
				val = k.component.getPropertyValue(k.propertyName)
				m = v.class.getDeclaredMethod('getCurrentTagPath', [])
				m.setAccessible(1)
				fpmi.tag.writeToTag(m.invoke(v, []), val)
```

The problem is that window.propertyAdapters is write-only in ignition. I haven’t found a work-around. Ideas?

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [May 4, 2014, 12:57am UTC](https://forum.inductiveautomation.com/t/manual-tag-writeback/8409/2 "2014-05-04T00:57:37Z")

</div>

Yes. It is write-only because in Ignition windows have a setPropertyAdapters method but no getPropertyAdapters method.

Instead of using fpmi.gui.getParentWindow(event).propertyAdapters, use fpmi.gui.getParentWindow(event).getInteractionController().getPropertyAdapters()

Best,  
Nick Mudge  
Ignition Consultant  
[nickmudge.info](http://nickmudge.info)
