Hey Everyone, first time long time, so please be gentle.
I have 2 tables: SOH with column SerialNumber and Archive with columns SerialNumber and Action.
If i add a new item into SOH i want to check if the SerialNumber exists in Archive, if it does add “Item Modified” in Action, if not add “New Item”.
The first item adds fine into the archive and shows “New Item Added” If i try to Modify that same item it only changes the existing row.
I need it to add a new row (duplicates are fine). I have tried creating different actions but had no love.
Thanx…
I assume you are using the SerialNumber as the row key? You cannot have multiple rows with the same row key in a single table.
If you want to allow multiple rows with the same SerialNumber, then I recommend adding a dedicated column for the row key and assigning it a random value, such as that provided by the UNIQUEID() function. This is known as a dataless key and is actually the best practice for all datasources.
Side note…
I don’t know your use case and why you have Archive and why you might want to allow duplicates. I would like to point out that you could simply add an Archive column as an archival flag to the SOH table. Set the Archive flag to TRUE when the row is “archived” and then adjust views to use a filtered list - Archive = FALSE. When you need to modify an archived row, simply tap a button to “un-archive” the row and have it show up in the SOH view. When done, tap the archive button again to re-archive the row. Maybe this would prevent additional implementation complexities and eliminate the need for duplicate rows?
I hope this helps!
Thank you…RowID is now my new friend