Simple get using a variable... scalar value error?
Options
David Richardson
Member ✭
I'm using a GET to obtain the id value of a table reference - the id, That value happens to be 14 as int.
I'm validating that it exists in a conditional before using the value (14) in a subsequent GET request. The second GET request
matching the table record id to the value obtained in the first GET - 14. I'm getting this error:[scalar value.jpg]The query is kinda duh...
[scalar value 02.jpg]testing in "Stop & Debug" artist_id is 14. A single entity. Why am I ending up with two entities (first image)? This query works as expected using the numerical 14 value, but not the var field_value artist_id
Debugging
I'm validating that it exists in a conditional before using the value (14) in a subsequent GET request. The second GET request
matching the table record id to the value obtained in the first GET - 14. I'm getting this error:[scalar value.jpg]The query is kinda duh...
[scalar value 02.jpg]testing in "Stop & Debug" artist_id is 14. A single entity. Why am I ending up with two entities (first image)? This query works as expected using the numerical 14 value, but not the var field_value artist_id
Debugging
Comments
-
Looks like artist_id is an object to get value in the field_name do artist_id.artist_id that will give you the number 14.
#I could be wrong as I am learning -
is on the right track. And if it keeps bothering you past the weekend, please bring it to our Statechange Pro office hours on Monday!
-
I noticed that too, object not the value. So to obtain the VALUE there are the "quick" get / set filters. I hard coded the value 14 in the input, I'm getting the expected results. The debugger:
[scalar value 10.jpg]
The input field value is 14 in BLUE, not the object as before.
So the logic of this feeble brain is that I need to "filter" the object to get it's value - 14 which should be the scalar value I'm looking for. The "quick filters GET and SET" appear to be the method on this.[scalar value 08.jpg]But no joy on this either. I'm getting null - the default - not 14. That's not expected.[scalar value 09.jpg]I verified that artist_id is an object and the value IS 14, NOT null (in a stop and debug) -
try to delete null as the default value and instead leave it empty and see what happens [image.png]
-
any luck?
[xtw9TN2PXcvPW.gif]
Apologies if my suggestions cause more confusion but the great thing is we are part of the PRO group to get assistance from top notch pros at an incredible offering. I believe that b/c of the PRO group offering my LOVE for Xano has increased by a magnitude of 3.87X -
🤣
-
Right!!!
I tried your suggestion deleting the "null" default and STILL got null. (?!?!?) the gif is PERFECT!!! -
That WAS it. Thanks so much for your help.
The GIF you sent was perfect for the way I feel sometimes
🙏
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