cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thanhdat410
Frequent Visitor

Auto fill the data after scanning the barcode - Asset Manangement Power Apps

Hi guys, I'm fresh to Microsoft Power Apps so I need some help from you guys. I'm making an Asset Management App for my company, just a simple one. So basically, I will include the scan barcode function to manage the property of our company. I'm struggling while creating the function that when an user tries to add new product, after they scan the barcode, if the barcode has already existed in the Sharepoint List then all data will be fetched into below columns automatically to prevent duplicate values and they just need to edit on that one. 

 

Can you guys help me with this? I have been researching for this one for two days on the Internet but couldn't find one that works.

 

Thanks, guys!

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @thanhdat410 ,

An example here, but you could put this on the OnScan of your scanner

With(
   {
      wExist:
      LookUp(
         YourSPListName,
         YourBarCodeField = Self.Value
      )
   },
   If(
      wExistID > 0,
      UpdateContext({varRecord: wExist}),
      NewForm(YourFormName);
      Navigate(YourFormScreen)
   )
)

Your display fields would then be varRecord.FieldName (each field name) and if no record was found, it would go to the new screen.

 

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

 

 

thanhdat410
Frequent Visitor

Thanks, @WarrenBelz, I will try this solution!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,165)