Skuid Platform on PostgreSQL - if you click in a drop down reference field, but don't select throws error on save

Hello, I’m using Skuid Platform on PostgreSQL. I’m struggling with drop down reference fields. If you click in the field and do a search, but don’t find what you want and choose to leave it (null) (it is not a required field) … on save, it throws a database error. It appears to be passing an empty string to the database on save. If you refresh the page, and don’t click in the field, leaving it empty, it saves fine. Any ideas for me?

I’ve validated this behavior, and I’m gonna call it a bug. It’s pretty rare that references are optional, and I think that is why this has not come up before. But we should totally support the optional reference field scenario, and not populated the blank space in the field when you execute the search and then decide not to actually select anything.

While we fix this in our product, there is a solution you can implement to keep moving forward.

  1. Create a model action that initiates when Rows are updated in your model (and specify update to the reference field in question)
  2. The action should be a “branch” action. And the formula should look like. "{{ReferenceField}}=''
  3. The “if true” action should be a “row update” that sets the reference field to blank.

Understandably - this is a messy. We’ll make a product fix soon. But will prevent the errors.