Problem with Table Reference Using an Object Array After APIs Auto Created

Options

I’m following this:  to have a table reference to another table to use an object array, but I did it after the APIs were automatically created and if I add the field after, the API is to type text not integer for the id and I can’t change it. Please see below. Does this make sense? How can I fix this?https://docs.xano.com/database/database-relationships

Answers

  • arturosanz
    arturosanz Member ✭✭
    Options

    I recommend to not use the linked inputs if you need more control on them. I that case it's better to add the inputs manually one by one choosing the right type and presets for each of them.

  • David Lundvall
    Options

    I'm not really understanding the answer, sorry.

  • arturosanz
    arturosanz Member ✭✭
    edited September 2023
    Options

    @Dave Lundvall the trip_type table you are linking to at 3:00 has a text type field, so Xano is adding the input type as text correctly, and because it is linked, you cannot change its type.

    Maybe you aren't linking the right table, or maybe the trip_type table doesn't have the fields you need.

    If you decide to link inputs to tables you won't have the possibility to change their types because the types are inferred from the table fields linked.

    I general, i avoid using linked inputs. I prefer to add inputs manually without linking them to other tables. There is no need to do so.