Preventing "No Selection"

Title covers it, really. I'd like to prevent the No Selection option on picklists.

One thing you can do is to Interpret a blank state as something else. For example, if my pick list is being used as an argument in a list filter (something I do a lot) I can’t insert a blank into the filter function or it will error out.

So, if the pick list is returning blank, I swap out which filter expression is being used for the table. It’s basically an if() that checks the value of the picklist, and then loads my default filter, or the fancy one that incorporates the pick list.

Hi Stu, I assume the use case you're working on is some sort of form validation when you want to force the user to make a selection. There are two common patterns when doing form entry (1) create a new empty row, and then have users edit the new row, or (2) create a form using of app screen variables and create a "save" button that generates a new row and inserts all the variables into the table. The second pattern is typically more flexible and the one I recommend using in general and especially for what you're trying to accomplish. Here's some more information about setting up forms in this way How to Build a Form from Scratch

What's nice about the second pattern is it allows you the opportunity to do form validation before saving. You can use the visibilities rules to only show the save button once the user has properly filled out the form. So in your case your button visibility would be set to "NOT(ISBLANK($[Picklist])"

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.