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
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?