# Dynamic sample entry only loading first measurement form

**URL:** <https://forum.inductiveautomation.com/t/dynamic-sample-entry-only-loading-first-measurement-form/12023>\
**Category:** Ignition\
**Created:** [August 10, 2016, 8:54pm UTC](https://forum.inductiveautomation.com/t/dynamic-sample-entry-only-loading-first-measurement-form/12023 "2016-08-10T20:54:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iheartada](https://avatars.discourse-cdn.com/v4/letter/i/6de8d8/32.png) [@iheartada](https://forum.inductiveautomation.com/u/iheartada)\
**Post date:** [August 10, 2016, 8:54pm UTC](https://forum.inductiveautomation.com/t/dynamic-sample-entry-only-loading-first-measurement-form/12023/1 "2016-08-10T20:54:40Z")

</div>

I have widget xyz which has three measurements and two attributes.  
After I select the location and definition. The entry from loads the correct fields, but only one.

If I hit new sample, each time it shows measurement 1 for each entry.

example:

Attribute Value

Height  
Weight

but it should look like this

Attribute Value

Height  
Weight

Attribute Value

Height  
Weight

Attribute Value

Height  
Weight

my code to load the new sample is the same as the one from the demo

```auto
definition = event.source.parent.getComponent('Definition Selector').selectedSampleDefinitionName
locPath = event.source.parent.getComponent('Location Selector').selectedLocationPath
sample = system.quality.sample.data.getCreateSampleByName('', definition, locPath)
if sample == None:
	system.gui.messageBox('Oops sample is null')
else:
	event.source.parent.getComponent('Sample Entry').sample = sample
	event.source.parent.getComponent('Button New').componentEnabled = 0
	event.source.parent.getComponent('Location Selector').componentEnabled = 0
	#event.source.parent.getComponent('Definition Selector').componentEnabled = 0
	event.source.parent.getComponent('Button Save').componentEnabled = 1
	event.source.parent.getComponent('Button Cancel').componentEnabled = 1
	event.source.parent.getComponent('Sample Entry').sample = sample
```

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![iheartada](https://avatars.discourse-cdn.com/v4/letter/i/6de8d8/32.png) [@iheartada](https://forum.inductiveautomation.com/u/iheartada)\
**Post date:** [August 11, 2016, 2:09pm UTC](https://forum.inductiveautomation.com/t/dynamic-sample-entry-only-loading-first-measurement-form/12023/2 "2016-08-11T14:09:28Z")

</div>

It was because my measurement values in the attributes all got reset somehow.

edit.

is it possible to isolate attributes in the dynamic entry form.
