Is there a way to create a column with unique...

Is there a way to create a column with unique values without being the key column?

And what expression would I use for that?

And without using the initial value Uniqueid () (I want to determine the value of the column myself)

Thx Bram

0 10 410
10 REPLIES 10

Check the below article and the section โ€œPreventing Duplicate Field Valuesโ€. help.appsheet.com - List Expressions and Aggregates List Expressions and Aggregates help.appsheet.com

Not exactly, you can use an expresion to control that there is no repeated values, but it can fail if two or more users simultaneously create a new row. The formula in Valid_if property of your unique_value will be:

COUNT(SELECT(YourTable[ID], AND([Unique_Value] = [_THISROW].[Unique_Value], [ID] <> [_THISROW].[ID]) )) = 0

Thank you very much @Aleksi_Alkio

Is there also a way to make a suggested value unique?

I have a form where a user can enter a file number: this number is automaticly generated in the

suggested_values==LIST(MAX(List Personnes[Dossier ID])

The problem now is that when two users are entering on the same time this form with this automaticly generated number, this number will be the same for both files.

You have any idea?

Bram

If you try to read the value from the list and as you mentioned, the biggest one, there is no solution how you could avoid that because two users are using the app at the same time.

Is there a way to make an action that saves the form when the user fills in a file number?

What do you mean by that? I couldnโ€™t follow, sorry.

No problem โ€ฆ I was not clear.

The values of the form are only saved in the backend googlesheet from the moment you click on the save button at the end of the form, right? So my suggested value =LIST(MAX(List Personnes[Dossier ID]) is going to suggest a new [Dossier ID] number to one user from the moment the other user saves his form. This means that when two users are on the same time completing the form (with multiple other columns to enter), the [Dossier ID] number will be the same.

I thought a solution could be that after entering data in the [Dossier ID] column, I oblige the form to save to the backend googlesheet with an action.

This with the purpose that my suggested value adepts immediately to te Max+1 number from the moment you have set the value in the [Dossier ID] column.

So I wunder if there is a way to oblige the form to save from the moment the value is set in the [Dossier ID] column.

Iโ€™m afraid that wonโ€™t work eitherโ€ฆ it doesnโ€™t matter what the process is, you can still have duplicate values.

But it would reduce de time where

more than one user sets the value of this column (since my form is quit long) and so it would reduce the chanse on duplicate values

Actually it wonโ€™t help. Letโ€™s say two users sync the app now, and then they start to fill the form. The other user fills the form 10 minutes and the other one 15 minutes. Because the sync time was the same, they both have the same data in their device. When they saved the record, they both will have the same value. If the third person has synced the app while they were filling the form, that person will have the same value again.

Top Labels in this Space