Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


hawkings
2009-08-06T13:48:40Z
By default I would assume that the value of a used variable is considered constant until it is set again. As it is now, this is not the case.

Is there anyway to add this feature?

For example when using dateformat to define the value of the variable , it is nice that this value stays unchanged, until it is set again.

Best regards
René
Sponsor
Forum information
ErikC
2010-01-05T10:06:32Z
I also would like to have an extra option into the set variable task.

Like a checkbox where you can parse the value to a constant, so set variable to {DATEFORMAT(yyyyMMdd)} will set is to 20100105.
Tomorrow the valiable isn't changed, its a normal fixed string in this case.

Regards
Erik
Uses Visualcron since 2006.
Support
2010-01-05T10:22:31Z
What about using another Variable instead? Like: {DATEADD(Seconds|1/1/2001 00:00:00 AM|d/M/yyyy h:mm:ss tt|0|d/M/yyyy h:mm:ss tt)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-01-05T10:34:00Z
Yes, this will do the trick for a date, but not for other things.
I just like to have the ability to parse the variable to a string/int/... removing all the variable tags.
Uses Visualcron since 2006.
Support
2010-01-05T10:37:04Z
Ok, I am a bit slow this morning 🙂 Could you give another real world example except dates where this does not work?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-01-05T10:43:33Z
For example:

Use this {FILE(GetRandomFileName)} for a user defined variable.

It telles me after running the task:
Variable 'test' was updated to: {FILE(GetRandomFileName)}

but I want it to be:

Variable 'test' was updated to: i3rpy4kh.uzz

---

If I do a c:\windows\system32\cmd.exe /c echo {USERVAR(test)} it is everytime a different value. I want it to be static to my 1st set (i3rpy4kh.uzz)

Regards
Erik
Uses Visualcron since 2006.
Support
2010-01-05T10:50:20Z
I see,

the question is, would it be enough if it worked the following way:

1. we add a check box "Translate Variable to constant value"
2. The first time a User Variable is used (and if it contains a Variable) the value will be reset to the Value of the Variable. It will never translate to any other value as it does not contain a Variable anymore

If the solution is OK we can think about this. It is not a trivial problem to solve because GET and SET is totally separated.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-01-05T10:52:45Z
You are talking about putting this checbox in the SET task, or at the variable level?
Uses Visualcron since 2006.
Support
2010-01-05T10:53:54Z
At Set Task.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-01-05T10:57:48Z
Ok, that sounds fine to me.

Quote:

The first time a User Variable is used (and if it contains a Variable) the value will be reset to the Value of the Variable. It will never translate to any other value as it does not contain a Variable anymore



Is the translation done at the set, or after the 1st use?

I think you have to do the translation at the set.
e.x. if you want to store a date at a specific time, it must be set to tha date at the set moment, not to the date when I retrieve the value for the 1st time.

Regards
Erik
Uses Visualcron since 2006.
Support
2010-01-05T11:04:22Z
Storing the time at Set moment would be much easier than Use moment.

So, then we would have a check box "Translate Variable to constant". The Variable will become a constant string when clicking OK to store the User Variable. Will this be OK?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2010-01-05T11:08:37Z
I was now talking about the Add/Edit User Variable.

Then we have the Set Variable Task.

In the Task case we can Set it to Constant when that Task is being Run. Is that OK?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-01-05T11:09:42Z
Ok,

So you create two options, one in the set and one in the defining variables.
Uses Visualcron since 2006.
Support
2010-01-05T11:10:57Z
Yes, Run. So, should we skip this at Variable creation and just focus on the Set Task - when it is running?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-01-05T11:14:58Z
I think the set task does the job because at the add/edit level it is a manual thing.

So only the at the 'SET task' level, implementing the checkbox, is a good addition to VisuaCron.

Hope to see it soon 😁

Thanks for thinking along with me!

Regards
Erik
Uses Visualcron since 2006.
Support
2010-01-05T11:23:24Z
Thanks for the feedback, if everything goes well you will see it in the next version.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2010-01-07T21:04:26Z
Scroll to Top