cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nico_TW
Helper I
Helper I

Open DetailScreen of Item from QR Code

Hello,

 

im tinkering with the barcode scanner module at the moment. My current implementation is a QR code which contains the name of an item like "5m Cable". 

The OnScan looks like this: Set(_Scan; BarcodeScanner1.Value)

The Default of my TextSearchBox is _Scan so that i am searching for the name in the QR Code.

 

Is there a way to directly open the DetailScreen / DetailForm for this item?

 

All my ideas end at the Item tab of the DetailForm and how do i set the BrowseGallery1.Selected to my Item via QR Code or how can i access an item directly without going through the BrowseGallery1 

2 ACCEPTED SOLUTIONS

Accepted Solutions
MichelK
Resolver II
Resolver II

Hello @Nico_TW,

 

There is an OnScan property on the barcode scanner. You could add this code on it :

Set( _Scan, Self.Value );

Set( gblRecord, LookUp( DataSource, name = _Scan ) );

If( !IsBlank(gblRecord), Navigate( DetailScreen), Notify( "No record matching the Scanned name was found" ));

 

And on the Item property of the form, you place gblRecord

 

Let me know if this helps!

View solution in original post

WarrenBelz
Super User
Super User

Hi @Nico_TW ,

Assuming '5m Cable' is a unique value - OnScan

With(
   {
      wScan:
      LookUp(
         YourSPList,
         YourItemField = BarcodeScanner1.Value
      ).ID
   },
   If(
      !IsBlank(wScan),
      Set(
         gblID,
         wScan
      );
      Navigate(YourFormScreen),
      Navigate(YourGalleryScreen)
   )
)

OnSelect of your BrowseGallery

Set(
   gblID,
   ThisItem.ID
)

Item of your Form

LookUp(
   YourSPList,
   ID = gblID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

View solution in original post

2 REPLIES 2
MichelK
Resolver II
Resolver II

Hello @Nico_TW,

 

There is an OnScan property on the barcode scanner. You could add this code on it :

Set( _Scan, Self.Value );

Set( gblRecord, LookUp( DataSource, name = _Scan ) );

If( !IsBlank(gblRecord), Navigate( DetailScreen), Notify( "No record matching the Scanned name was found" ));

 

And on the Item property of the form, you place gblRecord

 

Let me know if this helps!

WarrenBelz
Super User
Super User

Hi @Nico_TW ,

Assuming '5m Cable' is a unique value - OnScan

With(
   {
      wScan:
      LookUp(
         YourSPList,
         YourItemField = BarcodeScanner1.Value
      ).ID
   },
   If(
      !IsBlank(wScan),
      Set(
         gblID,
         wScan
      );
      Navigate(YourFormScreen),
      Navigate(YourGalleryScreen)
   )
)

OnSelect of your BrowseGallery

Set(
   gblID,
   ThisItem.ID
)

Item of your Form

LookUp(
   YourSPList,
   ID = gblID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,646)