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

Solved Solved
0 13 503
1 ACCEPTED SOLUTION

@Mynor_Menendez
Can you try with this?

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

View solution in original post

13 REPLIES 13

@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.

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?

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?

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)))

Thank you!

Youโ€™re welcome

Top Labels in this Space