Menu navigation #2

Discussion in 'Call Flow Designer' started by gustavskii, Aug 1, 2017.

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

    Joined:
    Jan 26, 2016
    Messages:
    57
    Likes Received:
    2
    Hello
    It is very confusing on how to navigate through menus in CFW
    There is a similar thread to this "Menu navigation". It only shows how to come back to previous menu using one loop, but what if you need to go back 2 steps
    So for example in my screenshot I need to go from "Option 3" in "Menu 2" to "Menu 1", and at the same time have "Option 2" in "Menu 2" go to "Menu 2"
    This is just an example, we have more complicated call flow right now with 3 levels of menus and user should be able to return to each level at any given time
     

    Attached Files:

  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,449
    Likes Received:
    115
    Hi @gustavskii,

    Actually it's pretty simple. You just need a callflow variable for the condition to keep looping on each loop. For example, if you have 3 levels, you need these 3 variables:
    - ContinueLooping1 = true
    - ContinueLooping2 = true
    - ContinueLooping3 = true

    Then, you need to set the Condition property for each Loop, to each of these variables.

    Finally, in the branch where users selects where they want to go, you use Variable Assignment components to set these 3 variables to the proper value. For example, if you need to go to Loop1 you set:
    - ContinueLooping1 = true
    - ContinueLooping2 = false
    - ContinueLooping3 = false

    Or, if you need to go to Loop2, you set:
    - ContinueLooping1 = true
    - ContinueLooping2 = true
    - ContinueLooping3 = false

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. gustavskii

    Joined:
    Jan 26, 2016
    Messages:
    57
    Likes Received:
    2
    @edossantos thanks for reply, I`m a beginner in programming, so it is a bit confusing for me
    So in the screenshot above
    In the first loop, in loop expression I write:
    - ContinueLooping1 = true
    - ContinueLooping2 = true
    - ContinueLooping3 = true?
    or do I create it somewhere else
    I got this part:
    "
    "​
    But how do I check if true then loop, if false then skip
    Do I write if statement, somehow, in the loop?
    When I put true in the loop it loops and when I put false in the loop it doesn`t
     
  4. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,449
    Likes Received:
    115
    No, first, you need to define 3 callflow variables. In the Project Explorer, click the callflow name (for example Main.flow), then go to the Properties windows and click on the button on the right of "Variables". There define 3 variables:
    - ContinueLooping1 = true
    - ContinueLooping2 = true
    - ContinueLooping3 = true

    Like this:
    upload_2017-8-1_20-5-27.png

    Then, for each Loop component, set the "Condition" property to the variable. For example:
    - For Loop1, Condition should be: callflow$.ContinueLooping1
    - For Loop2, Condition should be: callflow$.ContinueLooping2
    - For Loop3, Condition should be: callflow$.ContinueLooping3


    Hope it's more clear now.

    Regards.
    Ernesto.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.