what i have here are these functions that search for the class code and return the “Student Mood Count” from the “Student Mood 2” column:
(for example, if i go into the class with the code “er64Hz”, it should return 5; “fg45Wg” should return 1, and “Rw77Tx” should return 2. these numbers would be pulled from the “Very Good” cells from the “Student Mood 2 column”)
when i go into the “er64Hz” class, the label returns 5 just fine. however, when i go into the two other classes, they return “undefined”. what would be the better way to go about this?
Obviously this is just an example and you don’t want to get the list of values every time (unless you have to). I just put it together so you can see it all.
I would encourage you to consider using the Airtable API for this since its filterByFormula API request is flexible and powerful for doing all kinds of searches and sorts.
this is what i came up with using inspiration from your code, but it never seems to actually loop. i’m trying to see if i can pull the second item from the list (Bad), but the label always returns 3, meaning it never loops
How do you know the loop is not incrementing? I don’t see any wait blocks in your loop so you’re only going to see the last successful/true value for the if condition.
You’ll need to do some debugging to figure out which variable(s) including i have the values you expect them to and which do not.
going back to the same pivot table i used before, i used the debugging method trying all 5 items from the list. issues only arise when i try to pull data from specifically the second item in the list. for the first class i click in, the label is supposed to return 5, because the student mood count has 5 “Bads” in the aforementioned pivot table. however, it still returns 3, since the label is still seeming like it’s only returning items from the first item in the list, and never the second. all of the other items in the list work fine, however:
also @tthompson41231, i wish i could send you the link to my project, but it has firebase integration and you would need to make an account with a specific email address :[
Like I said, everything looks correct there, but I would need a wider view of your block. And if you do want to share your project, just make sure you uncheck share API keys. I don’t need to log into your app I just need to look through the blocks. If there’s any sensitive data in there, you can make a copy of your project and just delete all unnecessary pages that you don’t want me to see.