Question about Loops

Status
Not open for further replies.

csa452

Joined
Nov 11, 2010
Messages
24
Reaction score
0
Hello,

We are creating a project where we want to use a Record Component to have a user record some audio, then use a dynamic Prompt Playback to play it back to them. After this they will get a user prompt that says "if you are satisfied with this recording, press one to continue, or press 2 to re-record".

We are having some difficulty figuring out how set the user input '2' (re-record option) to loop the Record Component again so they can re-record the audio. We assume the condition for the loop component would be UserPromptName.Buffer EQUALS '2', but we're not sure exactly how we should place the loop component to get the desired result.

Any help would be greatly appreciated.

Thanks
 
You can't use a condition like UserPromptName.Buffer EQUALS '2', because the component UserPromptName is into the loop and not known when the condition is evaluated the first time. So you need to define a callflow or project variable, for example a variable named HasToRecord, initially set it to True, and then change it to False when the user presses 1 using a Variable Assignment component. Then you can use callflow$.HasToRecord for your condition.
 
Thank you, we did what you advised and have this working now.
 
Great to know! Thanks for the feedback.
 
Status
Not open for further replies.

Forum statistics

Threads
112,320
Messages
591,873
Members
165,466
Latest member
EMMEPICASA