Using LINKTOFILTEREDVIEW() to load a form with existing data

Ray
New Member

I am trying to scan a barcode and go directly to a View with a limited number of fields. In my case I want to add weights to records in an OrderDetails table.

I have set up a Scanner table and load a blank form to scan a barcode on the product that needs to be weighed. The form triggers an action that uses the LinkToFilteredView - it goes to a View with a row that matches the barcode value from the scanner to a barcode value that exists in the OrderDetails table.

My problem - If I direct the routine it to a form view the system seems to determine that adding a new record is the only option and generates a blank form. I can get the right display by using a detail view in the expression. But I would like to automate some actions when saving the form.

Is there a way to load the form with the data from the row that was matched by the barcode fields?

My code is: LINKTOFILTEREDVIEW(โ€œAddWeight_Detailโ€, [Barcode] = [_thisrow].[ScannedCode])

The AddWeight view is from a Slice that limits fields in the OrderDetails table. So Iโ€™m asking for records where the barcode in OrderDetails is equal to a record that is Scanned in ([Barcode]=[ScannedCode])

I tried the LINKTOFORM expression but could not get that to work either.

Thanks in advance for your time.
Ray

Solved Solved
0 4 476
1 ACCEPTED SOLUTION

Try:

LOOKUP([_THISROW].[ScannedCode], "OrderDetails", "Barcode", "key-column")

replacing key-column with the name of the key column of the OrderDetails table.

See also:

View solution in original post

4 REPLIES 4

Steve
Platinum 4
Platinum 4

Ray
New Member

Hi Steve - how would I get the KEY value? The barcode columns are not the key valuesโ€ฆ

Try:

LOOKUP([_THISROW].[ScannedCode], "OrderDetails", "Barcode", "key-column")

replacing key-column with the name of the key column of the OrderDetails table.

See also:

Ray
New Member

That is working the way I want it to. Awesome

My code is now:

LINKTOROW(
LOOKUP([_THISROW].[ScannedCode],โ€œOrderDetailsโ€,โ€œBarcodeโ€,โ€œOrderDetailIDโ€),
โ€œReceiveWaste_Formโ€
)

Thank you

Top Labels in this Space