Skip to main content

Notifications

Community site session details

Community site session details

Session Id : zFPyIkNeYestikmkzHzFmy
Power Apps - Building Power Apps
Answered

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

Like (0) ShareShare
ReportReport
Posted on 29 Aug 2019 02:38:10 by 28

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!

  • Verified answer
    CarlosFigueira Profile Picture
    on 21 Sep 2019 at 19:31:17
    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/.

  • djean64 Profile Picture
    28 on 21 Sep 2019 at 15:31:53
    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

  • CarlosFigueira Profile Picture
    on 21 Sep 2019 at 04:30:43
    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 Profile Picture
    28 on 21 Sep 2019 at 01:57:06
    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

  • CarlosFigueira Profile Picture
    on 21 Sep 2019 at 01:51:40
    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 Profile Picture
    28 on 21 Sep 2019 at 01:41:28
    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. 

    This is my screenThis is my screen

  • CarlosFigueira Profile Picture
    on 21 Sep 2019 at 01:13:17
    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 Profile Picture
    28 on 20 Sep 2019 at 19:07:20
    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? 

  • v-monli-msft Profile Picture
    on 29 Aug 2019 at 09:08:16
    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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard
Loading started