Forum breadcrumbs - You are here:VisualNEO Support ForumVisualNEO Win: Tips and TricksUsing the "!" in the predefined v …

You need to log in to create posts and topics.

agilefalcon(@agilefalcon)

10 Posts

December 27, 2018, 11:19 am

Quote from agilefalcon on December 27, 2018, 11:19 amWhen obtaining the short date from the system - short date format here in the USA is: "MM/DD/YY" for example, I use something like:

setvar "[!DateAdded]" "![DateShort]"

Notice that the "!" is outside of the opening and closing "[" & "]" on the predefined variable "[DateShort]"

When you subsequently use the "[DateAdded]" variable, for a label or text field, you must use this form:

[!DateAdded] - Note how the "!" is now inside the "[" & "]"

I played around with this for some time and the only way I could get a system date was to place the "!" outside the parenthesis of the predefined variable. Short date has literal characters, "/" which are also mathematical operators, thus you must use "!" to prevent a math operation occurring.

Anyone else notice having to use the "!" outside of the ShortDate predefined variable?

Chris

Fort Worth, TX

When obtaining the short date from the system - short date format here in the USA is: "MM/DD/YY" for example, I use something like:

setvar "[!DateAdded]" "![DateShort]"

Notice that the "!" is outside of the opening and closing "[" & "]" on the predefined variable "[DateShort]"

When you subsequently use the "[DateAdded]" variable, for a label or text field, you must use this form:

[!DateAdded] - Note how the "!" is now inside the "[" & "]"

I played around with this for some time and the only way I could get a system date was to place the "!" outside the parenthesis of the predefined variable. Short date has literal characters, "/" which are also mathematical operators, thus you must use "!" to prevent a math operation occurring.

Anyone else notice having to use the "!" outside of the ShortDate predefined variable?

Chris

Fort Worth, TX

Click for thumbs down.0Click for thumbs up.0

neodude(@neodude)

47 Posts

March 28, 2019, 3:25 pm

Quote from neodude on March 28, 2019, 3:25 pmNormally, if value contains a valid mathematical formula, VisualNEO for Windows will compute the formula and store the results in the variable. If for some reason, you want the variable to contain the actual formula instead of formula's computed result, insert anexclamation point “!” at the beginning of value. For example, the following statement:

SetVar "[Test]" "1+1"

will set the variable [Test] to "2". This is because VisualNEO for Windows knows that "1+1" is a mathematical equation and adds the two numbers together. By adding an exclamationpoint you can instruct VisualNEO for Windows to ignore the formula. For example:

SetVar "[Text]" "!1+1"

will set the variable [Test] to "1+1". (Note: The exclamation point is removed by VisualNEO for Windows.) You can use this technique in any VisualNEO for Windows Action where numeric parameters are allowed.

Source: VisualNEO Variables

Normally, if value contains a valid mathematical formula, VisualNEO for Windows will compute the formula and store the results in the variable. If for some reason, you want the variable to contain the actual formula instead of formula's computed result, insert anexclamation point “!” at the beginning of value. For example, the following statement:

SetVar "[Test]" "1+1"

will set the variable [Test] to "2". This is because VisualNEO for Windows knows that "1+1" is a mathematical equation and adds the two numbers together. By adding an exclamationpoint you can instruct VisualNEO for Windows to ignore the formula. For example:

SetVar "[Text]" "!1+1"

will set the variable [Test] to "1+1". (Note: The exclamation point is removed by VisualNEO for Windows.) You can use this technique in any VisualNEO for Windows Action where numeric parameters are allowed.

Source: VisualNEO Variables

Click for thumbs down.0Click for thumbs up.0

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy

To find out more, including how to control cookies, see here: Cookie Policy