Allow new records only

Hi. I would like to know if there is a way to allow only the insertion of new records in a column

@Mynor_Menendez
Yes it’s possible for sure. If you add the table with ADDS_ONLY mode, only new rows can be inserted but they can’t be edited or deleted.

1 Like

thanks for the quick response. I forget to mention that I need to just allow new values in a ref type column

@Mynor_Menendez
Can you please elaborate what do you mean with “… I need to just allow new values in a ref type column…”? Do you mean any user should not be able to select a ref item provided there’s already a record associated with it?

1 Like

I mean, the user should create a new ref item instead of select a record from a list. Actually, a user has the option to either select a record from a list or create a new ref item.

@Mynor_Menendez
Well the easiest way is to construct an expression in Valid_if of your REF column:

SELECT(RefTableName[KeyColumn],TRUE) - SELECT(RefTableName[KeyColumn],TRUE)

which will create an empty list in your ref dropdown and you will only see New
Is that what you want?

1 Like

perfect. That’s what I need. Thank you!

You’re welcome

I tried that but nothing appears in the ref column after I create the value.

@Mynor_Menendez
Your requirement was exactly like that, remember?

sorry. I thought the user would be able to select the created value

@Mynor_Menendez
Can you try with this?

SELECT(RefTableName[KeyColumn],TRUE) - SELECT(RefTableName[KeyColumn],TRUE) + SELECT(RefTableName[KeyColumn],[_RowNumber]=MAX(SELECT(RefTableName[_RowNumber],TRUE)))
1 Like

Thank you!

You’re welcome