cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
djean64
Level: Powered On

Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

Hello,

 

I can't make heads and tails of what I'm doing wrong. I created the app from my sharepoint list. I also want the ability to look up a value within a sharepoint list column based on a barcode scan and take me to the DetailScreen1 with the information within the row of that sharepoint list.

 

See my formula below placed under OnScan

 

Navigate(DetailScreen1,ScreenTransition.Fade,LookUp(<sharepoint list>,'<sharepoint list column name>'= BarcodeScanner3.Value))

 

Thank you so much in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

Another thing to look for is whether there are other places that also set the 'Record' variable. I created a new app with your scenario based on a SharePoint list (called 'deleteme20190920') with two columns: Title and Barcode (both of type "Single line of text"), and used the "Start with your data" to create a starter app.

Those were the changes that I did to the app to enable the scanner to go directly to a detail form:

  • Added a BarcodeScanner control in the main (Browse) screen, set its OnScan property to
    • Set(TheRecord, LookUp(deleteme20190920, Barcode = BarcodeScanner2.Value)); Navigate(DetailScreen1, ScreenTransition.Cover)
  • Removed the OnSelect property of the BrowseGallery1
  • Set the OnSelect property of the NextArrow1 control to
    • Set(TheRecord, ThisItem); Navigate(DetailScreen1, ScreenTransition.None)
  • On the DetailScreen, set the Item property of the DetailForm1 to
    • TheRecord

That should do it for the display form, as we decoupled it from the gallery selection. This would still be missing the integration with the edit screen - for that you would need to do something similar, and this is explained in this post I wrote a while ago: https://powerapps.microsoft.com/en-us/blog/decouplingbrowsegalleryfromforms/.

View solution in original post

9 REPLIES 9
Community Support Team
Community Support Team

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

Hi @djean64 ,

 

What is the column type of this column that you lookup to? If it's a text/number column, then below formulas should be set to achieve this:

BarcodeScanner2.OnScan=Set(Record,LookUp(<sharepoint list>,'<sharepoint list column name>'= BarcodeScanner3.Value);Navigate(DetailScreen1,ScreenTransition.Fade)
DisplayForm1.Item=Record

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
djean64
Level: Powered On

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

Hello Mona,

 

Thank you for the help.

Unfortunately it doesn't work.  The part that I am receiving an error message for is the latter one. 

DisplayForm1.Item=Record

Should it be separated by a semicolon or parentheses? 

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

There are two expressions in @v-monli-msft suggestion. The first one should be set to the OnScan property of the BarcodeScanner control:

Set(
    Record,
    LookUp(
        <sharepoint list>,
        '<sharepoint list column name>' = BarcodeScanner3.Value));
Navigate(DetailScreen1,ScreenTransition.Fade)

The second one should be set to the Item property in the display form on the DetailScreen1 (assuming it's called DisplayForm1):

Record

That also assumes that the DataSource property of the display form:

<sharepoint list>

Where <sharepoint list> is the actual name of your SharePoint list.

Hope this helps!

djean64
Level: Powered On

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

I'm still not sure why it's not working. Previously BrowseGallery1.Selected was there. 

Capture.PNGThis is my screen

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

If you click on the red 'X', which error do you see? Another option is to click on the "App Checker" icon (see below), and it will show you the errors of the document:

ForumPost001.png

Knowing which error you get will help with finding a solution.

djean64
Level: Powered On

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

Hello,

 

Thank you so much for your help. This is what I am seeing.

 

Capture2.PNG

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

Your data source for the form is "PCF_F"; is the lookup expression that you are using in the lookup from that list?

Set(
    Record,
    LookUp(
        PCF_F,
        '<sharepoint list column name>' = BarcodeScanner3.Value));

The record must come from the same data source as the DataSource property of the form.

djean64
Level: Powered On

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

It is. Also, I decided to delete the old one and redo it, thinking it would help so BarcodeScanner3 is now BarcodeScanner1. This screen though doesn't show any errors.

 

Capture3.PNG

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Lookup sharepoint list with barcode scan and navigate to detailscreen -- Help!

Another thing to look for is whether there are other places that also set the 'Record' variable. I created a new app with your scenario based on a SharePoint list (called 'deleteme20190920') with two columns: Title and Barcode (both of type "Single line of text"), and used the "Start with your data" to create a starter app.

Those were the changes that I did to the app to enable the scanner to go directly to a detail form:

  • Added a BarcodeScanner control in the main (Browse) screen, set its OnScan property to
    • Set(TheRecord, LookUp(deleteme20190920, Barcode = BarcodeScanner2.Value)); Navigate(DetailScreen1, ScreenTransition.Cover)
  • Removed the OnSelect property of the BrowseGallery1
  • Set the OnSelect property of the NextArrow1 control to
    • Set(TheRecord, ThisItem); Navigate(DetailScreen1, ScreenTransition.None)
  • On the DetailScreen, set the Item property of the DetailForm1 to
    • TheRecord

That should do it for the display form, as we decoupled it from the gallery selection. This would still be missing the integration with the edit screen - for that you would need to do something similar, and this is explained in this post I wrote a while ago: https://powerapps.microsoft.com/en-us/blog/decouplingbrowsegalleryfromforms/.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,886)