How to edit a name or any other parameter via Bubble & xano API integration?

Options

Hi there - I've tried 10 different ways to do this and cannot figure it out.

How can I edit the name based on a USER ID and/or bubble ID that is stored in Xano?

This is the error:

Answers

  • Iva
    Iva Member
    Options

    I'd really like to know this as well🙈

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    There may be more layers to the question, but I'd first remove the comma at the end of "newname" because JSON doesn't allow trailing commas.

  • raconcilo23
    raconcilo23 Member
    Options

    @Ray Deck - Still getting this error:

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    Yep, you are making progress. The issue here is apparently the difference between how bubble handles parameterized queries vs how Xano expresses them. My next move would be to try replacing the curly braces ({}) in your URL on bubble with square brackets ([]) because that's what the contextual help seems to indicate it wants.

    I'm hacking this based on what I see, but there are other bubble experts on this forum. I think in particular of @Pawel Magdanski , who has some deep experience in bubble-xano integration, who might be able to set us on the straight and narrow.

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    @Ray Deck @raconcilo23 I think you are right and replacing {} with [] in url should do the trick. Other possibility is to just not put parameter directly in url but pass it the same way as "name", but for that I belive You would also need to modify Xano url as well.

  • raconcilo23
    raconcilo23 Member
    edited April 2023
    Options

    @Ray Deck and @Pawel Magdanski - Thank you! That helped.

    Now I am getting an error about the header. I tried it with and without anything and also with the key being user_id and id

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    @raconcilo23

    As I can see fronn the screenshot in your URL you still have {user_id} instead of [user_id]. The header error is probably coming from the fact that you put user_id as a parameter in header section. Try to delete it and replace the brackets from {} to [] in url. The result should be that user_id as a parameter will automatically appear below.

  • raconcilo23
    raconcilo23 Member
    Options

    Thanks. I tried that. Now I am getting this error with this set-up

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Ok so now delete id parameter from the header. and replace [] with {} in body json. Is this endpoint require authentication in Xano? The other thing is that in your inputs in Xano I can see only user_id as an active one but you want to send name as well.

  • raconcilo23
    raconcilo23 Member
    Options

    Ok. Changes made.

    As a next step, the video has some information about the header and using an authoirziation toekn but I tried to follow the steps to get the authoirzation token for this user and I am still getting an error. I tried both authoirzation and authToken and Authorization and all gave errors.

    For the authToken, I found the specific one of this user

    Part 1

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Does you endpoint in xano has authentication enabled?

  • raconcilo23
    raconcilo23 Member
    Options

    I changed it from Public to auth reuired and still getting an error

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Do you have your email input active in Xano? In your first message it was inactive. Also maybe remove the spaces before "email" so it will be in-line with "name"

  • raconcilo23
    raconcilo23 Member
    Options

    @Pawel Magdanski - Thank you for your patience and help. When I try to make them all invisible, they turn back on so not sure what I am doing wrong there.

    But for now, Bubble initialized! If you have suggestions on keeping these turned off, let me know?

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Inputs which you actually want to use should be active, rest of them can be turned off as long as you are don't want to send those parameters from Bubble.

  • raconcilo23
    raconcilo23 Member
    Options

    @Pawel Magdanski - Yes. I understand this. The problem is that they turn back on on their own…

  • raconcilo23
    raconcilo23 Member
    Options

    @Iva - Did you follow? I have it working now.

  • Iva
    Iva Member
    Options

    @raconcilo23 I did, thanks for checking in!

  • raconcilo23
    raconcilo23 Member
    edited April 2023
    Options

    @Pawel Magdanski and @Ray Deck -

    It's working but now I have a uestion about adding a list. We are creating a healthcare app and need to give access to profile information to healthcare practitioners. We can post that erases and updates, but not sure how to append to a list.

    I assume this is possible by using an array and adding it to the list, but I am not sure how to differentiate old vs. new variables.

    Suggestions?

    Below is the functioning Initialization to update the entire list.

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    I'm not sure if I understand.

    So after sending the data from your screenshot you want to append them as an object to some list in Xano? Or you want to send entire list from bubble and then work on it and save it in database?

  • raconcilo23
    raconcilo23 Member
    Options

    Hi @Pawel Magdanski - We want to do two things:

    1. Append to a list of people allowed to see the data (so create a list in Xano)
    2. When someone wants to remove access, be able to delete an item from the list.

    So yes, we want to append them to a list.

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    So you have a list somewhere in xano table and you want to append the data sent by Bubble to this list correct? If the list will consist of only one field then you just need to update the record with the list you want to update, get current list as var, update it by making it equal to itself and append/remove the value you want to add. If you want the list of objects then you need to create an object with the fields you want to include and then append/remove it.

    Not sure if this is what you are looking for.

  • raconcilo23
    raconcilo23 Member
    Options

    Yes. It is but not sure how to do this in practicality… Will try again.

  • raconcilo23
    raconcilo23 Member
    Options

    @Pawel Magdanski - The problem is that it is not clear how to access the existing data base and then add the new value. So for instance, how do I differentiate between the field in the table vs. the input info?

    https://app.usebubbles.com/aKDPU3sMZjgPrrsnwx2b71

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Ok, so first thing I can see is that when you are creating variable you have text as a value not the input you intend to put there.

    Can you show the inside of "add to end" as well?