How to Pickup Product Name by Scanning Barcode

Dear Sir/Madam,

I have a StockItem table which has Stock Item ID, Barcode & Stock Item Name, named as SID, Bc, SIName and some other columns… Attached Snapshot.

I have created a TestBarcode Table and its form, attached Snapshot. Barcode Column is Tick Marked on Search and Scan and the StockItem Column is Referencing the StockItem Table.

In the StockItemVirtual Column I am able to get the Name of the StockItem when we scan the Barcode and the particular product is listed in the StockItem table by using the App Formula SELECT (StockItem [SIName], [Bc] = [_THISROW].[Barcode]). I want the Same to come in the StockItem Column which is of Ref Type and is referencing the StockItem Table and if the Barcode is not found it should let me select the Stock Item Manually from the Dropdown as Some Stock Items like Service Charges Router Setup is a Service and does not have a Barcode so I should be able to select that from the Drop Down List.

Please let me know!! Thank You

Solved Solved
0 4 941
1 ACCEPTED SOLUTION

Try it in Initial Value instead of App Formula

View solution in original post

4 REPLIES 4

Take your expression:

Change the output column to the key column:

SELECT (StockItem [SSID], [Bc] = [_THISROW].[Barcode])

Then wrap it in ANY() because you only need a single value, not a List of values.

ANY(SELECT (StockItem [**SSID**], [Bc] = [_THISROW].[Barcode]))

Thank you for your kind reply

If I understood correctly, I have put the below in the App Formula Box
ANY(SELECT (StockItem [SIID], [Bc] = [_THISROW].[Barcode]))

What happens is that it shows the product when a barcode is scanned but as I mentiioned in my query that incase the Barcode is not found it should let me select the Stock Item Manually from the Dropdown as Some Stock Items like “Service Charges Router Setup” is a Service and does not have a Barcode so I should be able to select that from the Drop Down List but here since I have put the above in App formula I am not able to manually select a Stock Item.

May be I put the formula in the wrong place. Please guide.

Try it in Initial Value instead of App Formula

I put the formula in Initial Value: ANY(SELECT (StockItem [SIID], [Bc] = [_THISROW].[Bc])) and it worked!! You are a Rock Star!! Thank you so much!! God Bless!!

Top Labels in this Space