Question about Loops

Discussion in 'CRM / Helpdesk / App Integration' started by csa452, Jan 3, 2012.

Thread Status:
Not open for further replies.
  1. csa452

    Joined:
    Nov 11, 2010
    Messages:
    24
    Likes Received:
    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
     
  2. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    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.
     
  3. csa452

    Joined:
    Nov 11, 2010
    Messages:
    24
    Likes Received:
    0
    Thank you, we did what you advised and have this working now.
     
  4. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Great to know! Thanks for the feedback.
     
Thread Status:
Not open for further replies.