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


BennyHa
2015-03-05T15:52:49Z
Hello everyone,

is it possible to manipulate a job variable, for example the path to a file, via user interface?

I have created a job variable and tried to manipulate the content of the variable in a popup task. I successfully managed to read the content of the variable in the task but could not figure out how to store the user input to that variable.

Can anyone help me with that issue?

Thanks in advance
Benjamin Hadwiger
Sponsor
Forum information
ErikC
2015-03-06T07:05:11Z
Hi Benjamin,

Welcome to the forum!

What you can do is add a popup task with a Text Input field.
The output should be the input value without the caption.
A next task can be the Set variable task. Use the output of the previous task as the set value to you variable.
That should do the trick.

Regards,
Erik
Uses Visualcron since 2006.
BennyHa
2015-03-06T09:14:04Z
Thank you, that worked!

It is also possible to have multiple text fields in one popup task window and access them from the set variables task like {prevOutput | var1} resp. {prevOutput | firstLine} or do I have to use a popup task and set variable task for each of the input text fields?

Greetings
Benjamin
ErikC
2015-03-06T10:00:49Z
Hi Benjamin,

Yes you can do this with the use of the function 'get line by row number'.
If you add one other input in the popup, the result value will added as a new line in the output.

In your set variable task you can use the funtion: {STRING(GetLineByRowNumber|{taskoutput of the popup task}|LineNumber)}
So to get the 1st result use: {STRING(GetLineByRowNumber|{TASK(your task number,StdOut)}|1)}
To get the 2nd result use: {STRING(GetLineByRowNumber|{TASK(your task number,StdOut)}|2)}
and so on.

Hope you manage to do this!

Regards,
Erik
Uses Visualcron since 2006.
BennyHa
2015-03-06T11:24:27Z
Ok, I managed to access the previous output lines in subsequent set variable tasks like this. Thanks!

Just one further question. The procedure worked fine with global user variables, but actually I would like the variables to be bound to the job they refer to.

When I used {JOB(Active,Variable,myVariable)} in the "Name/unique key" field of the set variable task , where myVariable is the name of the job variable that I want to update, I got the following output after running the job
Variable '' was added with value: {STRING(FirstLine|{TASK(ce0ba517-37e2-48cc-b9f3-1b6cc31413c7,StdOut)})}
which says that a variable with empty name was added the value. In other words, the job variable was not updated.

When just using myVariable in the "Name/unique key" field then a global user variable with the name myVariable is created.

Is it possible at all to write to job variables from a set variable task (or any other task) or can I just access global user variables?

Thanks for any help,
Benjamin
BennyHa attached the following image(s):
ErikC
2015-03-06T11:41:02Z
Hi Benjamin,.

With the set variable task, you can only modify user variables, no job variables.
Job variables can't be edited this way.

Regards,
Erik
Uses Visualcron since 2006.
BennyHa
2015-03-06T11:41:41Z
I managed to solve it myself. For users having similar problems, here's my solution:

You have to use the "Job/Task Control" task instead of the "Set Variable" task
ErikC
2015-03-06T12:38:08Z
Thanks,

I forgot 😊

Regards,
Erik
Uses Visualcron since 2006.
RMassey
2015-03-12T20:35:28Z
Originally Posted by: BennyHa 

You have to use the "Job/Task Control" task instead of the "Set Variable" task


Could you explain how you are doing that? I'd like to set the value of a job variable from a previous task in the job, but the only Action that seems relevant is "Task - Run Task".
BennyHa
2015-03-26T12:20:51Z
Sorry for the late reply. If you have not managed to get it work yet here's what you can do:

Use a Job/Task control Task, select the tab Job/Task control and go to Job Variables.
Then you can assign values - like different output lines from previous tasks - to the global job variables as you can see in the image
2015-03-26 13_10_54-Job Variables.png
Support
2015-03-26T14:18:35Z
Originally Posted by: BennyHa 

Sorry for the late reply. If you have not managed to get it work yet here's what you can do:

Use a Job/Task control Task, select the tab Job/Task control and go to Job Variables.
Then you can assign values - like different output lines from previous tasks - to the global job variables as you can see in the image
2015-03-26 13_10_54-Job Variables.png



Currently you can only set User Variables - not Job Variables via that Task. Moving this topic to Feature requests.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2015-10-23T07:49:52Z
In 7.7.8 you can now set Job Variables with the Set Job Variable Task.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top