I want to collect the data (4 digits) entered by the user in a file and tried to create file and write document but did not record anything ... Anyone know in what way you can record a. Txt with these data.
Solved! Go to Solution.
use the Get Digit String step to collect digits and store the result in a String variable, then use the Write Document step, while casting the String variable into a Document one. Like this: (Document) collectedDigits.
Can you give me a screenshot of your script?
I would like to save in a file .txt , this information:
The calling number , the day of the call, the time of the call and a code that we would ask the caller with a prompt.
Maybe the better way is upload a document , but with upload document we add data to the file or create a new file every time?
I think with get call contact info and get contact info is the appropriate to save info in a different variables and after write with upload document ??.
And this data will be written in the same file?
Thanks You Very Much ..
it depends on what you want. New information may be appended to the file or a new file may be created for each interaction. May I ask you what is the ultimate goal of this information?
I would recommend to save all that into a database table.
By the way, the calling number may be acquired by using the Get Call Contact Info step. The date and the time of the call is usually just a matter of calling the Set step with D[now] and T[now], assigning them to String variables.
but to save this information in a database I need another license because I have Cisco Unified CCX Enhanced, and neither can create xml files with this license, right? Or what can I do with this license?
He had thought he could be a way to control certain people ...
And in the another mail , in upload document , how do you declare this variables ?
user string and value "uccxadmin"
password string and value "cisco"
digits document and value ""
A lot of Thanks !
I see. Well, without the Premium license, you can't do database, indeed.
I don't understand your question "how do you declare the variables" - in the CCX Editor, bottom left corner, is this what you mean?
For the variables , is the same, because I think that the only difference with upload the document on repository or write on a directory on disk is that in a repo is accesible for all call manager but no more, ok ?
The question for the variables no is where , also is for the declaration of them ....because the first example (write on disk) is goog for me but the another don't operate correctly ..
About the repository: UCCX 7 is the last Windows-based version. Starting UCCX 8.0, it's an appliance (just like CUCM) so you cannot have direct access to the disk of the server (which is, I think, good). So if you write your script with the Write Document step, it will not function if you upgrade to UCCX 8.x. If you use the Upload Document step, however, your script will work after the upgrade, too.
The Document Repository is not available from CallManager (CallManager does not even have any knowledge about the Document Repo) but from the administration web page of UCCX.
About the second section on declaration: sorry, can you please rephrase your question, I am trying hard but I don't understand. I wish I could speak some Spanish but apart from "cerveza por favor" I can't.
Ja, Ja, Ja.... Your spanish is better than my english ... Ok , I don't know about the date and time , look:
How I write the date and time in a document ...
Ok, but I can not add data to the file because I always make a new one ...Maybe with upload document ? Or with create file is possible ?
Well what you can do is to load the existing file first, and append the new information and write again.
But what is the ultimate goal? I mean, this load-append-write business cannot go forever, I can't imagine UCCX handle gigabytes worth of information.
There's another way, custom Java code, but it's for an advanced UCCX programmer.
Or you can create multiple files, separated by a timestamp or any other unique ID. So it will be one file per interaction.
May I ask you again, what is the ultimate goal of the information?
for load the existing file I think is necesssary to do a new variable
(Name:lastdocument type:document valor:newfile.txt )
and after I need to load it with set lastdocument = newfile.txt , ok ?
For append the new information is the same with the last script ?
set finalString=dateString+","+timeString+","+DN+","coditreb ?
and for the last I need to write
wite document ((Document) finalString to "c:\temp\newfile.txt" , but like this no append info and generate a new file each time.....
The ultimate goal is for control the working hours of some workers from external centers , and they only have phone ...is not the proper way but seems something very basic that can work ...
But I think I will create 12 files, one for each center and through a menu and depending on the number that call written to a file or another. But , now I don't know how append the information in a file ?
Hmm. I am not sure I can understand.
About loading-appending-writing a file: the key is to fully load the file using the Cache Document step. Like this:
Okay, I am glad it works. If it saved you some work and time, then please consider buying me a book. My Amazon wish list is available in my profile details.