If you have a new question you’d like our support staff to post a response to, please visit our customer community, GoAnywhere Insiders, to pose the question in our Discussion Boards. We have a thread “Ask Our Tech Experts” that our support team monitors on a regular basis, or you can start a new discussion where other GoAnywhere users and support staff can weigh in. Log in or create your new account at
https://insiders.goanywhere.com.
If you need an immediate response, please create a support ticket or contact our support team by email at
[email protected].
-
JamesLSEG
- Posts: 6
- Joined: Tue Feb 16, 2016 11:05 am
How do I check if variable doesn’t/does exist on a project.
e.g. If variable exist do something else continue.
James
-
Support_Rick
Support Specialist
- Posts: 592
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
James,
It's unusual to utilize a variable that doesn't exist. But, depending on the situation, you could trap for the existence of the variable.
For example:
Code: Select allSetVar DNE=0
SetVar MyNewVar = ${VarThatDoesnotExist}.csv (OnError setVar DNE=1)
If DNE gt 0
** Correct Missing Variable issue here **
EndIF
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
-
JamesLSEG
- Posts: 6
- Joined: Tue Feb 16, 2016 11:05 am
Thanks for the information.
We are trying to make monitor project able to be rerun.
When the project is run by monitor it logs the files it is meant to get to the database and removes them once downloaded successfully. If it the project fails when you rerun the project if ${files} variable is not found it populates a rowset from database log and then runs the steps to get and and remove from db log.
The issue we have is if the monitor job fails it is hard to rerun and will never kick off again.
James
-
Support_Rick
Support Specialist
- Posts: 592
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
James,
This would be handled pretty much the same way...
Monitor generates filelist -> MyMonFileList
Project uses MyMonFileList to process files identified when monitor executes.
Inside Project, do something like:
variable MyMonFileList = "" (as a parameter)
(Note: Any value passed in from Monitor would override this)
...
If isEmpty(MyMonFileList) -> CreateFileList (MyMonFileList) with (blah blah blah)
...
ForEach ${MyMonFileList}
(etc...)
==========
What this accomplishes is .. if the project is kicked off by the Monitor, it passes the FileList var in as needed (thus MyMonFileList would not be empty)
If you execute the project from Project access ... then, MyMonFileList is empty (Thus triggering the If statement to generate the MyMonFileList before continuing)
==========
Hopefully, this will help you along ...
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696