Set Named Data Source (Global Data Field) Value from VBScript Follow
BT 2016 R7 - Enterprise Automation Edition
I am attempting to update a global data field (in BT system database) with a value, but nothing I have tried so far has been working.
What I am trying to do is to create a single data entry form that will determine the data that would be used by two templates. Data should be entered into the form on the first template, the values that were entered should be committed to the system database/update the value of those variables in the system database, and the values from the system DB should be used by the second template. The templates will then be put into a batch, and the entire thing run through print-station. User will run the batch, enter the data for the product a single time, and the two different templates (different size labels, on different printers), will print in unison.
Currently I am trying to run a simple script from within the OnProcessData event from a query prompt (query prompt needed to pull proper record from the product db).
The following does not update the value at all:
Format.NamedSubStrings("STOCK-SKU").Value = "FOO"
MsgBox("Current global value is: "+Format.NamedSubStrings("STOCK-SKU").Value) //returns the original/default value
The following returns a syntax error (This function or setting of property is not supported by Visual Basic Scripting)
Call Format.SetNamedSubStringValue("STOCK-SKU", "FOO")
What is the proper method to -set- the value of a named data source, and specifically to update a global data field in the system DB?
Any insight would be appreciated;
Please sign in to leave a comment.