To create a default value when data is added in Quality Window, Input and Output files are defined using QWAdmin.
- Open the application template
- Highlight the variable for which you wish to create a default
- In the Input File field enter a meaningful filename for the variable.
- In the Output File field enter the same filename
- Click Save
Then, when a user enters a value for this variable and clicks Save, that value will be stored in the Output File. When a user then Clicks on Add, the current value of the Input File specified will be inserted as a default value. If a user changes the value, then this new value will become the default value.
If you have a variable that requires a constant value to be inserted automatically, then follow the above instructions, Add one new record with the correct constant, then go back into QWAdmin and remove the Output File setting, as well as change the Required property to Protected so the user cannot alter the value.
Note: If you are using a newer version of Quality Window, a much simpler way to set a constant value to a variable is to use the CON: statement within the input file property. For example, if you wanted a variable to always have the constant ‘Line 1’, then in your Input File property, specify: CON:Line 1