NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Property Loader - Loading step Locals from SQL database

What is required to load step and/or step properties from a SQL database table. For example:
The table being read appears as follows

SequenceName StepName Key_int ID Date
Test.seq Step1 1 12 01/22/02
Test.seq 2 23 01/22/02
Test.seq Step2 3 13 01/22/02
Test.seq 4 45 01/22/02

Everytime I try to load the (Using Property Loader Step) from Step1 I get
the from Step2. It appears to read only the last record of the table. Could you please provide guidance and/or examples to overcome this issue.
0 Kudos
Message 1 of 3
(3,400 Views)
Rich -
The property loader step type does not look at data stored in the database as ordered. It assumes that anything in the recordset that meets the criteria specified on the filtering tab is importable. Whatever locals are defined within that filter are automatically applied and if two records apply to the same variable, then the last record applied wins.

Keep in mind that the locals variable scope applies to all steps in the sequence so to define a set of local values for one step and another for a different step is not quite what we had in mind for the step type. The idea is to import properties before executing any steps in the sequence and then run the sequence. Importing properties between steps goes beyond the intended scope of the step, but
it can be done if you limit the selected records using the filtering tab.

Hope this helps...
Scott Richardson - NI
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 3
(3,400 Views)
Scott brings up a good point about how the Property Loader works, so keep scope in mind when you use this step type. As an addendum if you would like to see Property Loading from a DB in action, feel free to check out our shipping example on the subject which should have been installed with TestStand. I reccommend going to C:\TestStand\Examples\Database and looking at the Setup stage of PropertyLoader.seq to see a standard usage scenario.

Regards,

Elaine R.
Applications Engineering
National Instruments
http://www.ni.com/ask
0 Kudos
Message 3 of 3
(3,400 Views)