Dropdown produces 'no data' when adding record into an empty table

I have a table based on a postgresql query.

If the table query returns no records (ie, the table is empty), and I try to add a new record to the table, the fields set as dropdown types return ‘no data’ when trying to make a selection:

If however, the table query contains at least one row of data, and I try to add a new record/row, the dropdown fields do show data to select from based on their value list (as expected):

Note: behaviour is the same if the dropdown fields have a static list or a query as their value list.

Hey @gsanders - what the expected behavior here, you’d like to be able to add a row even when the query returns no results?

Meanwhile, could you send over a screenshot for the settings for the dropdown column so I can see the values and labels?

Hi Justin - yes thats right - if the query returns no results, would like to create a newRow entry by adding a record, and then write that newRow entry back to a database table using a write resource.

Here is the current setting for the contract_type field:
image

But I have also tried entering values as a static list:
image

No difference.

@gsanders gotcha, makes sense. So my first hunch would have been that if you’re powering the dropdown dynamically with values from your query, if the query isn’t returning any data then your dropdown won’t either. For your hardcoding screenshot - did you also hardcode values for labels? If not can you try doing that too?

Just harcoded the static list into the labels as well as the values - and no difference - still ‘no data’ when the table is empty.

Worth noting too: the query for the dropdown values and labels is a different query than the one used to populate the table, so it does seem as though the problem is related to the table being empty and not anything particularly to do with the source of values or labels for the dropdown.

@gsanders gotcha. I was indeed able to reproduce this on my end - I’ll bring this up to the engineering team and update you when it’s fixed!

1 Like