Set field_value to Integer rather than Array with Integer [Solved]
Options
![Karl Larson](https://us.v-cdn.net/6037124/user_avatars/2042798.jpg)
Karl Larson
Member ✭
I'm using dot notation to set the value of a field. It sets the value as an array with the single value rather than just the value, unless I add a filter like MAX or MIN that pulls the highest value from the single-value array.
(e.g. active_goal.id returns [17] instead of 17. active_goal.id with MAX filter returns 17.)
Using MAX or MIN works so everything is fine as it is, but it seems like I should be able to simply set the value as an integer without it.
[CleanShot 2021-11-10 at 11.43.11@2x.jpg]
(e.g. active_goal.id returns [17] instead of 17. active_goal.id with MAX filter returns 17.)
Using MAX or MIN works so everything is fine as it is, but it seems like I should be able to simply set the value as an integer without it.
[CleanShot 2021-11-10 at 11.43.11@2x.jpg]
Comments
-
Hey Karl - I don't have enough context here so I'm going to assume that var: active_goal is coming from a query all records function. If you want to return just a single value there - then set the return type from list to single (Query all records > output > return).
-
Yep - that was it. Thanks!
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