To create variables in Word, you can follow the following procedure:
- Select the SmartPart in the Spart Part-panel (see Inleiding SmartParts)
- Click on the icon to Edit the Smartpart (pencil or four dashes below rightcorner, choose Edit).
- Now click on the + icon.
- Choose the type of variable. (See "type")
- Enter the desired data for the variable.
Type
Choose the right type for the variable. Available variable types:
- Text: this can be used for standard text like a name;
- Date: used to enter a certain date. (see format and default value);
- Yes/No: if the data is a choice. This will create a checkbox on the dialog. If the user checks the box a text can be displayed into the text.
- Number (without numbers behind the comma/with numbers behind the comma);
- Currency: use if the data is related to a value of money.
Gegevens
Name | Give a name to the variable |
DefaultFormat | With the type of date and currency you can chose a different format of the value. Date options Standard - 9-11-2018 00:00:00 Long - friday 9 november 2018 Medium - 9 november 2018 Short - 9-11-2018 d MMM yyyy - 9 november 2018 dd-MM-yyyy - 09-11-2018 d-M-yyyy - 9-11-2018 ddmmyyyy - 09002018 yyyy-mm-dd - 2018-00-09 Currency options Standard - decimal point of comma will be determined by the Windows language. #,##0.00 - decimal comma will be set 'solid' #.##0,00 - decimal point will be set 'solid' |
DefaultValue | The DefaultValue of the variable (optional). The format depends on the type of the variable: Text: Place the value between quotes "Mister John Doe" Date: The Default here is Today() - the present day will be filled in. This can be changed. Yes/No: choose between true en false Number/Currency: set the defaultvalue between quotes "100,00" |
Place on dialog? | Set the switch to the right to indicate the variable should be placed on the dialog window. |
Is required? | Set the switch to the right if the value is mandatory to be filled in. |
Multiline input? | Set the switch to the right if the input can be more than one line of data. (Only available with a variable of the Text type) |
Display name | If the variable had another label then the name of the variable itself, you can fill it in here. Example: the variable Lastname can be used as a label in the dialog. The variable NameContactperson will become: Name contactperson. |
Order | If it is important to display the variable on the dialog window in a certain order, input the number here (1, 2, 3, etc.). If you leave this black, then the variables will be displayed in order in which they are created. |
Depending field | Input the names of the variables that are dependant on the current variable. Example: On the dialog can be a question Fill in contactperson? Followed by the field (variables) Naam contactperson and E-mail contactperson. The last two fields only need to be filled in if the question Fill in contactperson? is answered with Yes. The fields are therefor dependant on the question Fill in contactperson?. So, in the properties of the variable Fill in contactperson?, fill both variable names of the Naam contactperson and E-mail contactperson. Seperate more then one variable name with a ";". Now the fields Name contactperson and E-mail contactperson will be greyed out untill the question Fill in contactperson? has the value True (checked). |