Set Enum Value by POST API

Options

Hi
I have a Hotel Data Table, in the same table I have
Enum called Quality:
High
Medium
Low

How can I send correct parameters from Bubble.io to XANO so it sets the Enum correctly

Answers

  • MattLaro
    MattLaro Member ✭✭
    edited March 2023
    Options

    Hmmm your situation would need a bit more context as I'm having a hard time to figure out what you're trying to do.

    Are you trying to convert data from a field received from Bubbles.io to Xano so it matches one of the enum values ? Are you trying to add an enum value from a POST API call ? Are you trying to convert a value you receive to switch between enum cases (ex: If I receive room_name = "King's suite", then Quality = "High") ?

    Initially, I'd say your call to Xano API from Bubble.io passes the value "High" (case sensitive) as is as text and you store that value in your database's enum column, it should set it correctly without issue.

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    @MattLaro is correct — you just need to pass this as text with proper case. Thanks, Matt!