Lookup using 2 unique columns

DAD
Bronze 1
Bronze 1

I have an inventory "Source_Data" table with 2 unique columns, Serial Number and Barcode#. To retrieve the information line on the table the user enters the Barcode# on the form, if it is not found the Serial Number field opens up and they enter the serial number to gather the information from the table.

In this example I am populating the "BldgAddress" Field on the form

IF([BarcodeFind]=TRUE,LOOKUP([Barcode], "Source_Data", "Barcode", "BldgAddress"), LOOKUP([Serial Number], "Source_Data", "Serial Number", "BldgAddress")

Finds the barcode just fine however if not the Serial Number lookup fails (Blank)

I am a rookie so be gentle..

Thanks in advance!

 

 

0 1 110
1 REPLY 1

What is the expression of your BarcodeFind column? May be you should try:

IF( IN([Barcode], Source_Data[Barcode]),
  LOOKUP([Barcode], "Source_Data", "Barcode", "BldgAddress"),
  IF( IN([Serial Number], Source_Data[Serial Number]),
    LOOKUP([Serial Number], "Source_Data", "Serial Number", "BldgAddress"), 
    "No Barcode or SN found"
  )
)