Filtering through Adalo API GET call and returning id
Options
![Nathan](https://us.v-cdn.net/6037124/user_avatars/3808629.jpg)
Nathan
Member ✭
Hi everyone,
Unfortunately I don't know enough to know if this question (or similar) has already been answered. I am trying to return the id number of an Adalo collection.
After I perform a GET call in XANO on the Adalo collection, I would like to filter through the result for the collection that has the property "User_Expense_ID" that is equal to my Input "User_Expense_ID", and then return the id of that collection. I hope the screen shot provides a clearer picture of what I am talking about.
[Xano_Screenshot.jpg]
Kind Regards!
Unfortunately I don't know enough to know if this question (or similar) has already been answered. I am trying to return the id number of an Adalo collection.
After I perform a GET call in XANO on the Adalo collection, I would like to filter through the result for the collection that has the property "User_Expense_ID" that is equal to my Input "User_Expense_ID", and then return the id of that collection. I hope the screen shot provides a clearer picture of what I am talking about.
[Xano_Screenshot.jpg]
Kind Regards!
Comments
-
If I am understanding your question right, I think the short version is:
1) Create a variable called "output" that is a simple integer,
2) set up a "for each" over response.result.records and call the iterator "item"
3) WIthin the for-each, do an "if" to see whether the "item.user_expense_id" is equal to your input, "user_expense_id"
4) Within the "then", update the output to the value of "item.id"
5) Break the loop
6) Hooray, output now contains your ID!
7) if this is the job of the endpoint, return output as self!
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback