What I am hoping to be able to do is create a little database of information in Data Jar and I’m struggling with making any relational sense of it. At the top level of Data Jar, I have a dictionary entry called Students. I have dictionary’s for each of the student, each listed as a name and ID. Inside of the students particular entry, I have some data that I would like to be able to use to either draw out information about a particular student or to filter all of the students listed by.
What I am getting stuck at is his how to the information on the very inside of the database as a type of logic to sort results. For example
Where current is a boolean result telling me if they are a current student or not. The use case would be wanting to filter out any former students, and display a list of all of the current students. Or maybe there is a text field titled school and I want to list the students at a particular school.
Is this possible to do? Does having a database structured like this make sense. I have been playing around with a repeat with each with a if statement inside of it, but I can’t seem to get it to “filter” out results to be used in a shortcut.
Thank you for the support!
That should definitely be possible, and it sound’s like you have thr right approach and just aren’t having much success in with it.
- Sharing a small set of dummy in your JSON structure that we can all test with to ensure it matches what you have.
- Setting out precisely, two or three query descriptions and what you would expect the output for the dummy data set would be.
- Sharing any shortcuts you currently have, but are not working as expected.
Trying to infer and build everything from scratch is time consuming for those who might be able to help you, and there’s every chance a false assumption could lead to wasted effort. The description you have is good, but having the data and code will make it much easier to help you, and for you to understand any fix in context.
I hope that makes sense.
Thank you so much.
Ok. the shortcut that I have been playing with is Data Jar to Multiple Levels. It really isn’t finished or working in any way. I think I’m mostly stuck in how to structure it.
The following are screen shots of some dummy data in Data Jar as a kind of minimal data set:
Image of the student1 dictionary, with two fake student dictionary entries:
Image of the details of one of the student dictionary entries with two pieces of data inside. Likely as I build this out, this inside would have more information. The data pieces would be consistent across each of the student entries. So for example I could potentially want to get a list of all of the full names and student IDs of the students who have current enrollment as true.
I think if I could figure out how to pull out this “inside” data to filter, I could be able to figure out how to get about anything out of it with Shortcuts. What I would want to be able to do is call the shortcut and have it look at all of the students dictionary items, filter out the results that have current enrollment set as false, and return all of the full names and ids of the students who are current enrollment true.