Advancing letters?

Hello, I am trying to create a shortcut that collects contact info and populates and email to send a crew list. Most of that is simple but here’s my question:

How do I have shortcuts assign a camera letter and advance each time a prompt repeats?

Ask “How many camera operators?” > Repeat {result} times > Show “Select {A,B,C,etc.} Camera Operator” > Select contact > Get Details from Contact > Text “Details, {A,B,C,etc.} Camera” > Add to Variable “Operators”

I can’t figure out how to solve adding and it automatically advancing the A,B,C lettering. Right now I have it prompt each time to choose a letter but it’d be awesome to have it prompt and assign the letter.

Thanks!
Orlando

Actually I figured it out. Added a dictionary with 1:A, 2:B. 3:C, etc and each repetition searches for the dictionary value that aligns with the repeat index. Works like a charm!!!

Happy Holidays

Here’s the final Shortcut for cinematographers:

https://www.icloud.com/shortcuts/421f4e1c06734f7498ba40059a2b0700

The dictionary approach is perfectly legitimate and allows for you to more easily associate additional data in the future alongside the name of the camera. You could hold positions, operators, models, etc for example.

Purely for the sake of completeness, it is useful to know that lists in Shortcuts are ordered sets of data. You can use Get Item from List to pick data items at a particular index (position). That’s a quick and easy option for simple sets of data, but as I noted above, dictionaries give you greater scope for expansion.

1 Like

Thanks Sylumer that’s a very helpful breakdown!