While loop with lists

Hi,

I'm stuck with my iOS shortcut.

What I need to do is to create a loop that repeats while the user keeps adding data and for a maximum of 10 times. In every iteration, it asks the user to input text and stores it in a different variable.

This is what I've tried, but definitely, it doesn't work. It stores every Provided Input in the same variable list.

0
Set variable ExitLoop to Number
10
Repeat Number
  If ExitLoop is 0
    Ask for Text with Item Repeat Index
    If Provided Input is text
      1
      Set variable ExitLoop to Number
    Otherwise
      Add Provided Input to List
    End If
  Otherwise
  End If
End Repeat

Any help?

Thanks, Dani

While loop with lists
 
 
Q