VoiceGuide IVR Software Main Page
Jump to content

variable from variable

Recommended Posts

Hi,

we use string with variables to connect with webservice

We get data from database and variable from database has structure like: $RV[database_dataname] and we get string like bellow:

http://x.x.x.x/public/webservice/?type=soap&method=$RV[connecting_status]&project_id=$RV[project_id]&session_id=$RV[session_id]&calling_number=$RV[calling_number]&agent_id=$RV[agent_id]&menu_id=$RV[menu__id]&queue_position=$RV[position]&effect=$RV[connecting_status]

and we need to save this into other variable like: $RV[webservice_path]

but VG in this case save with actual variable available in script like:

http://x.x.x.x/public/webservice/?type=soap&method=&project_id=&session_id=ID20180914_113938_43_7_50020&calling_number=555000555&agent_id=&menu_id=&queue_position=&effect=

 

 

how to copy string with variables to other variable?

Each time VG changing variable to value in evaluation module.

 

Share this post


Link to post

So you would like to create a $RV that in its value has $RV expressions themselves, without them being replaced with the current values.

One approach that could work here is to have the database return a string that instead of "$RV" has some other placeholder, eg: "XXX". So the string returned from database is:

http://x.x.x.x/public/webservice/?type=soap&method=XXX[connecting_status]&project_id=XXX[project_id]&session_id=XXX[session_id]&calling_number=XXX[calling_number]&agent_id=XXX[agent_id]&menu_id=XXX[menu__id]&queue_position=XXX[position]&effect=XXX[connecting_status]

and then in an Evaluate Expression module us the Replace function and save the outcome to $RV[webservice_path]

The Replace function call would look like this:

Replace($RV[database_dataname], "XXX", "$RV")

Please note that the above approach has not been tested.

If the above results in $RV[webservice_path] still having the values of individual $RVs then you could just use $RV[database_dataname] to generate a new $RV[webservice_path] with the current values when needed.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×