new table column not shown as table input in function stack

Options

When I add a new column into one of my database tables it does not appear as a selectable input in my list of API endpoint inputs or in my custom function inputs.

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Hi @prosperly this is correct. A new field would only show up when using the database link input, which is found by default on the auto-generated CRUD endpoints. You can add Database Link inputs anywhere though. Keep in mind the database link input will take all the schema from that table and their settings from the database table.


  • prosperly
    prosperly Member
    Options

    @Michael Udinski

    I've actually already set it up this way. But what i'm referring to is adding a column in a table that is already linked. Do i have to relink the database every time a change is made to the columns in that table?

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    It should show up automatically on the Database Link as long as the API Access setting is set to Public

  • prosperly
    prosperly Member
    Options

    Here's an example where I added 'rehab_costs' to a table, yet it doesn't show up under inputs.

  • prosperly
    prosperly Member
    Options

    yet id does appear when it comes to mapping:


  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    And when you re-link it does not show up?

  • prosperly
    prosperly Member
    Options

    Ah, so I do have to remove the database link and redo it? That becomes pretty time consuming as I have to manually hide all the inputs I don't want to use, of which there are many in this example.

    If that's the route I have to go every time I add new inputs, so be it. But it seems cumbersome?

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Let me clarify, you should not need to re-link it every time you add something if you use a DB link. Something may have gotten caught up for this particular field in your workspace for some reason, which is why I'm asking if it shows up when you re-add it.

    If you notice this is persistent then we definitely will want to investigate further.

  • gbdoin
    gbdoin Member
    Options

    I have just hit the same issue on my end.

    • Created "field_a" in DB, this one was properly added as input to my endpoint through the pre-existing database link
    • Created "field_b" an hour after, this one isn't getting added as input to the same endpoint
    • Both fields are of the same type (enum) with the same options, and both are public
    • If I add a new database link input, the new field "field_b" does show up as expected

    I'll contact support and circle back here

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Thanks @gbdoin and @prosperly - it does look like an issue at least with enum and some other data types. We're having our Engineers work on a fix.