09-13-2011 08:13 AM - edited 03-14-2019 08:31 AM
Hi all,
I'm actually busy developping some scripts and I'm able to upload prompts, documents, and everything standalone. Now I will need to compile everything in a script and ideally I would need to put some parameters as DOCument filename...
If I try with a Document like :
Name : myDocument
Type : Document
Value : DOC["FileStored.xml"]
It works perfectly.
If I try the following like :
Name : myVariable
Type : String
Value : "FileStored.xml"
Name : myDocument2
Type : Document
Value : DOC[myVariable]
It seems not to work.
My main goal is to be able to go and pick the right XML file depending of some conditions I might put in my script... If not possible it will need to put many "if" to determine which file I need instead of concatenating the right file name based on my conditions ...
Any tip on how to do this?
Thanks in advance
Regards
Christophe
Solved! Go to Solution.
09-13-2011 08:47 AM
Hi Christophe
My approach to this has been as follows:
String, parameter, sDocumentFilename
So sDocumentFilename is a simple String, and made a parameter enterable in the web UI. You would set this to "myfile.xml" or whatever is appropriate.
THen in the script:
set docWhatever = DOC[sDocumentFilename]
This correctly sets docWhatever to DOC[myfile.xml]
Presumably it's some hidden magic of the Document object/set step that makes it work like this rather than using the variable name of the string in the variable definition for the Document. If I understand what you are asking correctly :-)
Regards
Aaron
Please rate helpful posts..
09-13-2011 08:47 AM
Hi Christophe
My approach to this has been as follows:
String, parameter, sDocumentFilename
So sDocumentFilename is a simple String, and made a parameter enterable in the web UI. You would set this to "myfile.xml" or whatever is appropriate.
THen in the script:
set docWhatever = DOC[sDocumentFilename]
This correctly sets docWhatever to DOC[myfile.xml]
Presumably it's some hidden magic of the Document object/set step that makes it work like this rather than using the variable name of the string in the variable definition for the Document. If I understand what you are asking correctly :-)
Regards
Aaron
Please rate helpful posts..
09-14-2011 12:00 AM
This is exactly it!
It's working the way you mentionned and that really what I needed.
You made my day Aaron
Many thanks
Regards
Christophe
09-14-2011 12:30 AM
No problem :-)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide