NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace the hidden step property Id (GUID) by a unique integer number on sequence level.

Hi,

 

I want to log TestStand data into an existing SQL database.

The step ID in my database is an integer (Integer data van -2^31 (-2.147.483.648) tot 2^31-1 (2.147.483.647)),

so a GUID id does not fit in this field.

 

Is it possible to change the GUID id to a unique integer number on sequence level? TestStand should stuff the integer id automatically while inserting steps…

 

If a number field is added to the test steps definitions, is it possible that TestStand automatically fills the numeric step ID for each instance of the test steps in the sequence while inserting the step?

 

Best regards

0 Kudos
Message 1 of 2
(3,476 Views)

You could use the index and step group of the step to create a numeric id, but it will change as soon as any step is inserted before the step.

 

If you absolutely can't change your database and have to make it work, you could always generate/update a map of GUID to integer id for each sequence, perhaps at runtime from the first step in the sequence. Basically, have the first step create or update the mapping. You'd also likely need to store a last used id so you know what id to start with when you add anything to the map.

 

Really probably the best solution is to change the database though. If you really want a unique ID per step that survives inserting new steps before it, then a GUID is a much simpler way to go.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 2
(3,463 Views)