Page 1 of 1
A variable previxed with #
Posted: Sun Nov 09, 2025 4:01 pm
by OldGeek
I recently downloaded a task from the forums. It used a variable {#Text}. Is this an array

- Variable.jpg (44.4 KiB) Viewed 166 times
Re: A variable previxed with #
Posted: Sun Nov 09, 2025 4:22 pm
by Oleg
What is the task? Please give me a link so I can explain the algorithm in more detail.
About
# read here please:
https://robotask.com/help/index.html?ru ... iables.htm The depth of expanding variable.
If you use
{Text}, the variable is expanded to its full depth. That is, if the Text variable contains other variables in the text, they will also be expanded, and so on recursively to the very end.
If you use
{#Text}, only the content of the
Text variable will be extracted without attempting to expand variables in the content of the variable.
Sometimes it can be useful.
Re: A variable previxed with #
Posted: Sun Nov 09, 2025 9:02 pm
by OldGeek
The task came pre-installed in the "Complex" folder, it's name was "Retrieve task parameters to CSV" or "[DEMO] Retrieve task parameters to CSV"
It reads the task names, etc using VBScript into a variable Text. The next statement was Str Trim with the source string {#Text} and the Assigned Results was Text (no curly braces)

- RoboTask Code.jpg (80.9 KiB) Viewed 146 times
Re: A variable previxed with #
Posted: Tue Nov 11, 2025 2:22 pm
by Oleg
I have (for example) many tasks with names that contain strings such as {Date}, {DateTime}, {TaskFolder}, and other variables. I need the original task names to be preserved in the list, i.e., the variables should remain unexpanded.
So I use the explession {#Text}