cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
660
Views
0
Helpful
3
Replies

UCCX 8 - DOC[variable] usage not possible ???

cvanitterbeeck
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

Aaron Harrison
VIP Alumni
VIP Alumni

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..

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

View solution in original post

3 Replies 3

Aaron Harrison
VIP Alumni
VIP Alumni

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..

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

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

No problem :-)

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: