How to Disable "New" option from a Dropdown ref

Hi guys, I have a Dropdown ref but I want to disable the option to create new records to the source table. For my app, the new records should only be created in the source table not from ref Dropdown.:
image

Use a “valid_if” in that section of the editor and set it to:

TableName[ColumnName]

(Change tablename and column name to the key you are referencing)

Works like a charm…

2 Likes

I tried your suggestion and it worked perfectly! But, my apologizes @TyAlevizos , I forgot (I just edited the topic’s title) to say that it is a Dependent Dropdown.

Right now, in my valid_if expression I have a select expression, because data loads depending of another dropdown. I tried added your suggestion using OR() expression but got this error:

You obviously need to restructure the formula.

If you are dropdown is dependent on the value in the other field, you need to take into account when you construct the formula.

Lets assume you have field called [Option] , and enum type, options of either A or B.

Then expression willl be

IFs(
[Option]=“A”,
Empleados[codigo_empleado],
[Option]=“B”,
Select(Responsables[codigo_empleado],[area_id]=[_thisrow].[area_id])
)

I m not sure exactly how you want to dynamically change the list, but this could give you a clue to construct your own formula to fit with your case.

So far, this is the expression I have in the valid_if
Select(Responsables[codigo_empleado],[area_id]=[_thisrow].[area_id])

works perfect, becase I need to load all the [codigo_empleado] from the selected [area_id] in a previous dropdown.

But I just need is to disable the option of “New” to avoid users create new records from the Dropdown.

oki doki.

Then you create slice for Responsable table, and make slice view only, or at least not able to add.
Assuming this slice callced ResponsableViewOnly

Then you use the slice for your expression.

Select(ResponsablesViewOnly[codigo_empleado],[area_id]=[_thisrow].[area_id])

3 Likes

Just change “OR” to “INTERSECT”

(As a test, this might have performance issues)

perfect, perfect, Perfect! That worked like a charm, thanks @tsuji_koichi!

Great to hear yours words.
Keep up with Appsheet.

1 Like

Hi @TyAlevizos I tried and get this error:

but I already solved with @tsuji_koichi suggestion. Thank so much both for taking time to help me, really appreciate it.

1 Like

The slice solution is excellent