Variable changed after set

Discuss RoboTask here
Post Reply
ivan.ulens@vcst.be
Posts: 18
Joined: Mon Oct 28, 2019 12:38 pm

Variable changed after set

Post by ivan.ulens@vcst.be »

Set Variable Bijlagenaam
{Bijlagenaam1}_D{Year}{MonthNo}{Day}_T{Hours}{Minutes}{Seconds}.pdf
Wait For File
{Pathnaam}\{Bijlagenaam}
Script error: E: 7/04/2021 7:49:52: File "D:\TRANSFERZONE\TEMPBARTENDER\VCST_DELIVERY_D20210407_T074952.pdf" doesn't exist.
The File "D:\TRANSFERZONE\TEMPBARTENDER\VCST_DELIVERY_D20210407_T074951.pdf" exist.
What can cause this?
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Variable changed after set

Post by Oleg »

When you set a variable be sure to turn on "Expand variables" option
Image
In this case RoboTask expands all variables and then set the value to variable

If this option is OFF then RoboTask assigns the value as-it-is. In this case RoboTask expands nested variables when you use the variable in other actions
You are using variables that depend on the current time. Thus, the value depends on the time of use.

Both modes can be useful for different cases
Oleg Yershov
ivan.ulens@vcst.be
Posts: 18
Joined: Mon Oct 28, 2019 12:38 pm

Re: Variable changed after set

Post by ivan.ulens@vcst.be »

Thanks, now it works.
Post Reply