cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaxWendorff Helper II
Helper II

If Function with Lookup

Hi, I am making an app that scans barcodes and uploads the data to a sharepoint list. Everyday a new pick list is going to be uploaded so only data thats on that list can be scanned. I have a funtion right now that using lookup that references the list and does not display the data if it is not on the list. I want to add an if statement to that funtion so that if the data is not on the list then the app displays an error. My current code is:

 

If(LookUp(Table2_1,Location = BarcodeScanner1.Value), BarcodeScanner1.Value, "Error")

 

I have tried a lot and can not seem to get te syntax down for the IF funtion. 

 

Any Help would be greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
myke_deabreu Resolver III
Resolver III

Re: If Function with Lookup

my bad

 

if you using this one : If(IsBlank(LookUp(Table2_1,Location = BarcodeScanner1.Value, BarcodeScanner1.Value)), "Error")

 

I missed a bracket before ","Error" - try the formula above.

View solution in original post

5 REPLIES 5
myke_deabreu Resolver III
Resolver III

Re: If Function with Lookup

Try this:

 

If(IsBlank(LookUp(Table2_1,Location = BarcodeScanner1.Value, BarcodeScanner1.Value), "Error")

 

#Basically you checking if the result is blank. if it is show "Error". If your result produces a value like 0 you might want to remove "Isblank" and do something like:

 

If(LookUp(Table2_1,Location = BarcodeScanner1.Value, BarcodeScanner1.Value)=0, "Error")

MaxWendorff Helper II
Helper II

Re: If Function with Lookup

Thank you so much for your fast response!

 

I tried the funtion and I received this error:

 

"Unexpected charecters, the formula contains 'Paren Close where Eof is expected."

 

Is this just a syntax issue?

myke_deabreu Resolver III
Resolver III

Re: If Function with Lookup

my bad

 

if you using this one : If(IsBlank(LookUp(Table2_1,Location = BarcodeScanner1.Value, BarcodeScanner1.Value)), "Error")

 

I missed a bracket before ","Error" - try the formula above.

View solution in original post

MaxWendorff Helper II
Helper II

Re: If Function with Lookup

Thank you so much!!

Highlighted
myke_deabreu Resolver III
Resolver III

Re: If Function with Lookup

Np Max - Glad I could help!

 

Happy Apping

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (7,840)