Product Search by Primary Key or barcode or Generic code

Hi guys,

In the current list I can select the product without problem since the ProductId is the primary key.

How can I do if when using a scanner I look for the product by the barcode? or if I type a generic code that also finds it, this in the same field as seen in the image

Either I use the list, or I use a scanner or a code, it returns the product name, I have no idea how to fix it

I am in an invoice to the client, in detail

regards

varios codigos.jpg

0 11 325
11 REPLIES 11

Add another column for the barcode input, then use a LOOKUP() expression as initial value on the Ref column.

Thank you,
Could you give me an example?
Should this another column be referenced?

No, second column should not be a Ref.

Thanks, you mean it this way,

Now what I do?

LeviP_0-1685047005110.png

 


@Marc_Dillon wrote:

then use a LOOKUP() expression as initial value on the Ref column.


 

 

I already did it, when typing or using the scanner, it returns the name of the product in the "ProductID" KEY field"

However, if I select the product from the dropdown list, the barcode remains empty, and if I try the reverse, the formula tells me "Expressions in schema 'InvoiceDetail_Schema' have a circular definition. Check app formulas and initial values for column 'ProductID' "


@LeviP wrote:

when typing or using the scanner, it returns the name of the product in the "ProductID" KEY field"


I cannot tell from this sentence, is that the desired result or is something wrong?

 


@LeviP wrote:

However, if I select the product from the dropdown list, the barcode remains empty, and if I try the reverse, the formula tells me "Expressions in schema 'InvoiceDetail_Schema' have a circular definition.


Well now you're adding new requirements, which of course won't work with the solution presented on the original requirements.

 

 

 

ok, thank you
Is there a way to use a single field to search for all three, as seen in the image?

You did not include an image. What 'all three'? What is the desired end result?

I mean the initial image,
The key is by the ProductID column

But if I use the scanner or enter any code from the columns of the "Code or CodBarra" photo, it doesn't work, I was looking to make it work but nothing

varios codigos.jpg

You could do something like

ANY( FILTER( table , OR( [Codigo] = [_THISROW].[search-col] , [Codbarra] = [_THISROW].[search-col] ) ) )

Top Labels in this Space