Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Purushothaman
Partner - Creator III
Partner - Creator III

Difference between ('$(FoundFile)') and $(FoundFile)

Hi Experts,

What is the difference between  in writing the variables the below :

1) $(FoundFile)

2) ('$(FoundFile)')

 

Thank you!

2 Solutions

Accepted Solutions
marcus_sommer

The variable and it's content is the same but the interpretation by the call may be different. Usually is the call of $(var) applied by a numeric content and '$(var)' by a string content and here not different as if the content would be directly written. This means it depends on the place where the variable is called which syntax is valid, for example by using the variable as an expression or a path/file-name the variable content would be a string but the place expects already a string and therefore the call would be $(var) and not '$(var)' because in the last would the single-quotes become a part of the string and wouldn't be valid anymore.

- Marcus

View solution in original post

martinpohl
Partner - Master
Partner - Master

sometimes you need the quotations in script

eg, the variable is text, you want to load the text from the variable into a field

'$(FoundFile)' as File

if you write this statement wihtout quotations, the script looks for a field, called like the text in the variable.

Another reason could be a dot or a comma in your variable. With comma, the script can interpret, without there will be an error.

Regards

View solution in original post

2 Replies
marcus_sommer

The variable and it's content is the same but the interpretation by the call may be different. Usually is the call of $(var) applied by a numeric content and '$(var)' by a string content and here not different as if the content would be directly written. This means it depends on the place where the variable is called which syntax is valid, for example by using the variable as an expression or a path/file-name the variable content would be a string but the place expects already a string and therefore the call would be $(var) and not '$(var)' because in the last would the single-quotes become a part of the string and wouldn't be valid anymore.

- Marcus

martinpohl
Partner - Master
Partner - Master

sometimes you need the quotations in script

eg, the variable is text, you want to load the text from the variable into a field

'$(FoundFile)' as File

if you write this statement wihtout quotations, the script looks for a field, called like the text in the variable.

Another reason could be a dot or a comma in your variable. With comma, the script can interpret, without there will be an error.

Regards