Action isn't giving the expected result

Hi all, I have an action that is giving me the wrong result, was wondering if anyone had a moment to look at it for me.

My inventory app has two tables:

Bank2026 which contains columns Barcode # (key) and Found Room (target of the action), plus some information columns. This information is a list of equipment I need to locate for the annual inventory.

Scans2026 also contains Found Room, and 12 slots for scanned barcodes, labeled Barcode Scan 1…N, a timestamp, and a virtual column which concatenates the barcodes list as so:

CatBarcodes=
concatenate(
[Barcode Scan 1], “;”,
[Barcode Scan 2], “;”,
[Barcode Scan 3], “;”,
[Barcode Scan 4], “;”,
[Barcode Scan 5], “;”,
[Barcode Scan 6], “;”,
[Barcode Scan 6], “;”,
[Barcode Scan 8], “;”,
[Barcode Scan 9], “;”,
[Barcode Scan 10], “;”,
[Barcode Scan 11], “;”,
[Barcode Scan 12]
)

I want Action: Set Room for record in Bank2026 to set these columns:

Found Room = Select(SCANS2026[Found Room],CONTAINS(SCANS2026[CatBarcodes],[_THISROW].[Barcode #]))

So that when I go to an entry in Bank2026 and press Set Room, it populates the single room where the item was found. However, instead I get the complete list of all rooms.

Any idea where my mistake is?

Thanks in advance.

Hi anythingichoose

Try using the formula below. When you use SCANS2026[CatBarcodes] inside the SELECT, you are getting a list of lists.

Select(SCANS2026[Found Room], CONTAINS([CatBarcodes], [_THISROW].[Barcode]))

If the Found Room column from SCANS2026 is the key, you can also use FILTER instead of SELECT.

Also, if there is no possibility of having more than one Found Room, you could use LOOKUP instead of SELECT or FILTER.

3 Likes

That did it! Thanks for the quick save.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.