If record exists

Hi Guys

I need to create an alert or prevent a record being created with the same [JobID] in a table/UX.

If a user sects a dropdown which is populated from a slave table, if that record exists in the table to be applied to then alert the user the "[JobID] already exists, please edit the original".

Is this possible?

 

Solved Solved
0 8 118
  • UX
1 ACCEPTED SOLUTION

Please test with

ISBLANK(
FILTER(
"MobileEstimateCustomers",
([_THIS] = [JobID])
)
- LIST([_THISROW])
)

View solution in original post

8 REPLIES 8

It sounds that you are looking to avoid duplicate records being created with same [JobId]. Please try the approach mentioned in the article below in the last part. You could typically use a Valid_if to prevent duplicate of [JobID]. 

https://help.appsheet.com/en/articles/961274-list-expressions

 

Hi @Suvrutt_Gurjar , thanks for that.

So in my table "MobileEstimateCustomers", the [JobID] row has a suggested value of 'Combined[JobID], how would I apply the filter and could a user be alerted?

DaveWillett_0-1651229699855.png

 

Please try in valid_if.

Please alert the user with the valid_if error message.

Aaah I see... would this look correct:

ISBLANK(
FILTER(
"Combined",
([_THIS] = [JobID])
)
- LIST([_THISROW])
)

You will need to enter the table name where you are trying to prevent duplicates.  

I believe it will need to be table "MobileEstimateCustomers" in the expression, if that is where you are trying to avoid duplicates.

Yes of course, didn't think of that, so:

ISBLANK(
FILTER(
"MobileEstimateCustomers",
([_THIS] = Combined[JobID])
)

- LIST([_THISROW])
)

Would that be correct?

Please test with

ISBLANK(
FILTER(
"MobileEstimateCustomers",
([_THIS] = [JobID])
)
- LIST([_THISROW])
)

Spot on @Suvrutt_Gurjar , many thanks

 

Top Labels in this Space