Dropdown Add Records

Is there a way to build an app or an existing component like a dropdown menu and if 0 records are found then allow the user to and new records. I want to enable users to add records if none exist in the collection.

Hi @Zmbaker ,

You would need to have another screen to add that, for reference, here is the dropdown replacement that can be adjusted for that.

With this you can have update actions which you cannot get with normal dropdown.

Hey there @Zmbaker

You can use the dropdown component.

For this, I’d have the name and an ID number parameter for the dropdown. In this, I have “Post Categories” as an example.


For your database, add 1 record to the database collection used for the dropdown. For the name put “Add New” and for the ID number, put 0.

Add your dropdown, input, and a button component.

Group the input and button and change the visibility of the group to sometimes visible if dropdown > ID is equal to 0. You can set your “Create” action on the button from there.


Result:

This is very helpful, it helps me part of the way. But let’s days they are searching for a value and it returns no results found? I don’t want them to have to know to go to the add new record.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.