Prevent duplicate registration

Alvim
New Member

Hi

In the form below, the user can register an activity.

How could I prevent another user from making an exactly the same release?

3X_1_2_1206b9ad7285efdb46f13f2091b30c1e110b5a8a.png

Solved Solved
0 9 383
1 ACCEPTED SOLUTION

You put your expression in show_if instead of valid_if.

View solution in original post

9 REPLIES 9

I think you can add a ID or something like that

Hi

thanks for the help, sorry for the beginner question, but Iโ€™m learningโ€ฆ

I tried to adapt a tip from @Steve , but Iโ€™m in doubt about its application.

I have a table with columns [CONSULTANTS],[ACTIVITY],[START DATE],[END DATE],
[TURN]

when the user is going to save a new record, the formula must verify that there are no identical data in the table.

if it exists, generate an error with the message โ€œthis record could not be savedโ€

and where should i add this expression?

ISBLANK(
FILTER(
โ€œtableโ€,
AND(
([column1] = [_THISROW].[column1]),
([column2] = [_THISROW].[column2]),
โ€ฆ,
([columnN] = [_THISROW].[columnN])
)
)
)

Hi

I inserted this expression in the columns and when I try to duplicate a record the form hides.

So far it seems to be a great solution, because it prevents the user from proceeding with a duplicity.

But the formโ€™s SAVE button is available.

How can I solve this?
Can I condition the button to be invisible in this case?

ISBLANK(
  FILTER(
    "RESERVS",
    AND(
      ISNOTBLANK([CONSULTANTS]),
      ([CONSULTANTS] = [_THISROW].[CONSULTANTS]),
      ISNOTBLANK([ACTIVITY]),
      ([ACTIVITY] = [_THISROW].[ACTIVITY]),
      ISNOTBLANK([START DATE]),
      ([START DATE] = [_THISROW].[START DATE]),
      ISNOTBLANK([END DATE]),
      ([END DATE] = [_THISROW].[END DATE]),
      ISNOTBLANK([TURN]),
      ([TURN] = [_THISROW].[TURN]),
      NOT([_ROWNUMBER] = [_THISROW].[_ROWNUMBER])
    )
  )
)

Where?

What does โ€œthe form hidesโ€ mean?

You can from UX>Localize, but I wouldnโ€™t recommend that in this case. Use validation instead.

I entered the expression in each column that I need to validate.

3X_f_f_ffa98e64ff8cf2478f2de56ab498b98d285bf2c5.png

When the form is being filled out, it looks like this

3X_7_0_70f6615195dfe9a0f5236b61dfee9d9326c871a3.png

And during filling, when you select the turn, if the values entered in the form are on the table, the form looks like this

3X_e_d_ed3cc42f19dd036cdecee64ee38c03219883a04e.png

I donโ€™t know if this is the best way to avoid duplication, but it works well for me. But in this case, the save button could be disabled and the user would get an error message.

If there is a best practice to avoid duplication, I am open to suggestions

You put your expression in show_if instead of valid_if.

Solved

One more lesson learned

@Marc_Dillon Thank you very much!

Thank you community

Top Labels in this Space