Forum Discussion
Because the pipeline object that is returned from the Search Records action is a "list" you will need to be clever about how you reference the value. Unlike when you iterate through the list using the built in loop action, you can't simply reference the value by dragging and dropping fields from the visual builder. Using Jinja, you can (similar to working with an array in other languages) be explicit about which item in the list you'd like to get the value from. For example: If I wanted the Record ID# from the first record in a list object, instead of using the expression that shows up when I drag and drop the field {{a.id}} I would specify that I wanted the value from the first record in the list like so: {{a[0].id}} and if I wanted the second I might use: {{a[1].id}}
Here's what that looks like in action:
Cheers
------------------------------
Justin Torrence
Quickbase Expert, Jaybird Technologies
jtorrence@jaybirdtechnologies.com
https://www.jaybirdtechnologies.com/#community-post
------------------------------
- KevinRybicki4 years agoQrew MemberThis doesn't solve the issue with sorting the returned results though. Does anyone know how to set sort order in the search query?
------------------------------
Kevin R
------------------------------- RyanPeart3 years agoQrew TraineeI am also interested in sorting the search query. Does the order have to be sorted before the query?
------------------------------
Ryan Peart
Database Analyst
Minerva Knowledge Management
------------------------------
- StephenStudy4 years agoQrew TraineeI'm brand new to Jinja and should have realized there would be a way to index into the return list/array. Thanks for that nugget Justin!
------------------------------
Stephen Study
Software Development Manager
Robishaw Engineering Inc
Houston TX
------------------------------ - PrashantMaheshw2 years agoQrew CaptainHey Justin,
Thanks for posting this . Like Stephen, I never realised that search items are index in arrays too ! Awesome , and thanks for posting this.
Almost 2 hours of hunting !
------------------------------
Prashant Maheshwari
------------------------------