how to remove quotes ""

Options

I have a function stack that is returning the value that I need for another function but for some reason it is surrounded in quotes "" , How do I remove these quotes so I can proceed

this is the function that is causing the error I believe

@Michael Udinski

Answers

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    edited July 2023
    Options

    Hmm I think something else is going on here. It looks like you might have the wrong user table selected. I see in your function it has User with an uppercase U but your function stack uses user with a lowercase u.

  • macgyver
    macgyver Member
    Options

    Good observation but that is the correct table. I don't have a table using a capital U

    Any other ideas?

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    edited July 2023
    Options

    And just to confirm, when you hit that error and look at the debugger, step 8 "Create Authentication Token" is the last step that is executed?

  • macgyver
    macgyver Member
    Options

    This is what the debugger is returning. "above screen shot"

    If I run the function by its self it seems to be working fine as in the screen shot above. But when I combine the functions or just use the run the function solo and use the returned item in my front end "bubble" as say a text field dynamic text it returns the item with the quotes

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Oh I see now…

    This Endpoint is returning the raw token as text. The Bubble response is probably set to and expecting JSON. You can switch it on either ends but I think JSON would be the preferred method to work with. So, I would just add a key name to your response on the Xano endpoint. Right now, it's returning "As Self" which is the raw value:

    Click on the response and add a key name like authToken, token, or anything that makes sense for you:


    Save and publish your changes, then give it another go. Re-initialize the call first on your front-end.

  • macgyver
    macgyver Member
    Options

    Could this be an issue the json extras?

    Im getting this error now

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Xano will give you clues so you can debug your errors:

    For example, the error message is one clue. You need a scalar value for the param "field value". This almost always means you have the wrong data type somewhere. Param "field value" likely means you have a DB request function (i.e. Edit Record) where your mapping the field value parameter incorrectly (with the wrong data type)… You can always check the debugger to see exactly where the error occurred.