Lists in Data Jar and Shortcuts

I’m getting started using data jar and shortcuts, and I’m not quite following how to get a list from one to the other. I’m a teacher and trying to create a shortcut to create quick notes regarding students. In Data Jar I have a list for each of my classes that contains the names of the students in that class. In shortcuts, I’d like to have it show me a list of classes which I’m doing with a menu, the depending on the class chose, do a Choose from list with the appropriate list from Data Jar, with the result being saved in a variable for later output.

I’ve done some programming in php, but I’m totally lost moving the blocks around and finding out how I get the list from Data Jar into the choose form list. So far I’ve succeed in having it give me a select with only the first student, and in creating a loop that gave me the list repeated multiple times (or an app crash). I’m sure this is basic, but not sure where to go.

1 Like

I’ve put together a little shortcut that allows you to work with a list in Data Jar named AnimalList.

You can create/rebuild the list, add to the list, or choose something from the list.

Hopefully, it will give you some insight as to how to work with Data Jar lists.

Do remember that if you are having problems debuggin the issue, it is really hard to help without having access to the code - like I’m sharing with you here. My suspicion is you were repeatedly processing a whole list rather than the item you selected from the list, but that is pure speculation on my part.

Anyway, take a look and see if this sets you on the right path. If you are still stuck, provide your shortcut, your observations, and what you want it to do.

Thanks so much, this showed me what I needed to understand to get it working. I normally would have shared, if I had anything worth showing. I did finally get it working, just trying to figure out how to get it to exit back out of numbers after inserting.