Making a duplicate error message (but can ignore it)

Hello, I made an application for the first time for my father, an inventory app - and I used to have a duplicate error message show up when I scanned a barcode in my Receive Form view but it's no longer there and I am not sure how to get it back. 

My inventory is based on unique serial numbers (I do have some exceptions like cable in lengths barcodes to track and surges with the same barcode) and it was really handy when the table said "there's a duplicate!". On my google sheet, it highlights red to let me know but I am not sure how to get the Appsheet to recognize that. 

I made it so I can track on Appsheet and my Googlesheet, but it's not the usual way of references that people seem to use, so it's a little messy- but it's really functional.  It's an application for my dad, and he's old so tried to make it really easy to use. 

Currently on the Appsheet Receive view I use the row filter condition already..so I am not sure I can have it twice? 

Technically the only thing the app touches in this sheet tab are the rows "ROW ID" "DATE" "SCAN SERIAL N."

Receiving View   / Back view 

Receiving form 

Google sheet tab 

Ideally, I would like this solution to work for the "ADD TO TRUCK" table because this morning he scanned the same item twice in the truck when it was already in the truck...but he forgot he scanned it the other day, as you can see you here.. lol 

Add to Truck 

Thank you for any help,

Christa

 

 

 

Solved Solved
0 9 240
1 ACCEPTED SOLUTION

if you want to allow adding duplicates but only want to highlight the duplicates in the table you can do this, without having an extra column in your sheets:

go to UX / Format Rules / Create a rule on the table "receive" or the intended table

Use this as an expression, replace table name and the serial_number column to what you actually have:
COUNT(SELECT(Table Name[serial_number], [serial_number] = [_THISROW].[serial_number])) > 1

then select cell/ cells / and an icon to display
highlight color
and text color

Hussein_Osseily_0-1710762788706.png

 



View solution in original post

9 REPLIES 9

You would need to add a validation rule that it's not possible to do rather than trying to see the "duplicate request.."

Another way is to use a column or multiple columns as a key so he won't be able to add the same twice.

I will look at adding a validation rule, I havn't done that yet.

For the second one - because I have other products that are not unique (like cable and accessories for example) I can't use the serial number as a validation key since they are combined products.

I just want a warning to let him know. 

I couldn't get the validation rule to work, not sure why.

So I made a new column in google sheets that tells me if "It's a duplicate!" 

and added the message in "summary column" - top right text of each row. 

Now my serial numbers will know in the google sheet and in the app if it's a duplicate. 

Duplicate message - success! 

So it's easy to see something double. 

It would be nice if the text could be red color.. but not sure that's possible. 

if you want to allow adding duplicates but only want to highlight the duplicates in the table you can do this, without having an extra column in your sheets:

go to UX / Format Rules / Create a rule on the table "receive" or the intended table

Use this as an expression, replace table name and the serial_number column to what you actually have:
COUNT(SELECT(Table Name[serial_number], [serial_number] = [_THISROW].[serial_number])) > 1

then select cell/ cells / and an icon to display
highlight color
and text color

Hussein_Osseily_0-1710762788706.png

 



This is a great answer, thank you!! 
I decided to keep the column in sheets, but if I didn't need to this would be great.

Your adding color answer also provided me with what I needed, thank you. 

Here is a picture of the result.

truck1duplicate red.png

Goad that it works, if you want to keep the duplicate column 

then its less expensive to use in the format rules such an expression: 

 

isnotblank([duplicate]) change duplicate to your duplicate column name

and use red 

because the count and select in my previous is heavier to process for such a simple use

if you want to prevent adding duplicates without any exception:
go to DATA/TABLE / COLUMNS/ Serial_Number column (or how its named in your table) / Edit/
VALID_IF

NOT(IN([SERIAL_NUMBER], TableName[SERIAL_NUMBER]))

add a error message if you want 

If you have exceptions, you can add AND() or OR() expressions to define it more 

This would be great for other people. 
Unfortunately with an inventory of unique serial numbers to keep track where they end up at customer locations, and their returns,  means I also have over 20 exceptions of items that use the same barcode.  l

With the google sheet side I have a managers eye view so I can delete and see where everything is.
In-app I have an inventory report for basic view of what I have. But editing, adding barcodes to the inventory log are done in the googlesheet side. 

Then highlighting the duplicates can be enough, as you explaining. 

Top Labels in this Space