How to prevent duplicate Drop-down field entries?

How can I prevent duplicate data on the Drop-down field?

Unfortunately, the Drop-down field does not support Prohibit duplicate values setting.

Screenshot of the App with the Drop-down field:

Screenshot of Drop-down field’s settings:

Hi @Jayron_Rosel,

Could you kindly elaborate on the reason why it has to be the dropdown field and what it is exactly that you are trying to do?

Hello Sean_Tcbn,

I’m creating driver’s scheduling app, so I put two drop down list for driver name and car name.
then I want to prohibit duplicate entry to avoid conflict scheduling on the availability of the driver and car.

Here is the screenshot:

The content of my app:

The content of my drown down settings:
Driver’s name:

Car:

I hope you can help me with my problem, thank you so much sir.

Hi @Jayron_Rosel,

Thanks for sharing that.

Based on your provided information, checking for duplicates before saving the records would be easier.

The following APIs are available in the “kintone” API.

In the event before saving the record create and record edit screens, if an error message is assigned to the event object’s error, and the event object is returned, an error message is displayed at the top of the screen, and the record cannot be saved.

Also, by specifying the values set in “Driver Name” and “Car Details” in the “GET” REST API query to retrieve records in bulk, you can check for other records that have the same set of values.

So, if the same combination of values is set, an error message is displayed, and the record cannot be saved, and if the same combination of values is not set, the record is saved as is.

I think that would be the closest to your desired process/outcome.

Could you check that and see if it’s helpful to you?

1 Like

Hello Sir Sean_Tcbn,

Can you give me an exact example?

Thank you.