web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / onclick after barcode ...
Power Apps
Unanswered

onclick after barcode needs to select from a dropdown in sharepint

(0) ShareShare
ReportReport
Posted on by 3

I made a barcode scanner and if i scan it, it writes a couple of things to a sharepoint list. I have one columt in sharepoint called locatie. This is a lookup field with some simple shelves. I want to say that if a barcode is scanned it picks a rondom available field of that dropdown. The fields are unique, since i cant store more than 1 product on a shelf. The problem is that i do not find how i can do this.

 

 

image.png
image.png
image.png
Categories:
  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

    Hello @reinaerd 

     

    Achieving what You are looking for is complicated. I hope all that I put down here will make sense.

     

    First, there are a few flows that we need to sort in Your logic to make sure You are not running into some unexpected error.

     

    1. There is one available location per product, so the relationship One-To-One means You need to find a way to remove locations currently used by live products that were related to each location.

    2. You must prevent any products from being added when Your Storage / Warehouse runs out of available Locations.

    3. Also, You need to notify the user that's what happens so the user can investigate and make space if possible.

     

    Here is my proposal for what You could implement:

     

    To your List of Locations, add column Text called "Status" and make a mass edit to change all records to "Empty"

     

    Next, apply this code to the Button that is currently patching your Scanner input:

     

    Important make sure the names of Columns and Lists are maching and I did not make any mistakes I try place names to match Your Screens, but I could missspeal something.

     

    If(
     CountRows(
     Filter(
     Shelving,
     Status = "Empty"
     ).Titel
     ) <= 0,
     Notify("No Available Locations Make Space"),
     Set(
     varLoc,
     Patch(
     'Barcode Scans',
     Defaults('Barcode Scans'),
     {
     Titel: BarcodeScanner2.Value,
     'Barcode Type': BarcodeScanner2.Type,
     'Scanned Person':User().FullName,
     'Scanned time': Now(),
     Locatie: First(
     Shuffle(
     Filter(
     Shelving,
     Status = "Empty"
     )
     )
     ).Titel
     }
     )
     )
    );
    Patch(
     Shelving,
     LookUp(
     Shelving,
     Titel = varLoc.Locatie
     ),
     {Status: "In Use"}
    )

     

    Now the only process You will need to implement is when You will change the status of the Location back to empty if this will be a manual process when someone doing an audit and changing the status, or it will be automated example when the product will run out I leave this to You.

     

    hope this help

     

  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

    Hello @reinaerd 

     

    Achieving what You are looking for is complicated. I hope all that I put down here will make sense.

     

    First, there are a few flows that we need to sort in Your logic to make sure You are not running into some unexpected error.

     

    1. There is one available location per product, so the relationship One-To-One means You need to find a way to remove locations currently used by live products that were related to each location.

    2. You must prevent any products from being added when Your Storage / Warehouse runs out of available Locations.

    3. Also, You need to notify the user that's what happens so the user can investigate and make space if possible.

     

    Here is my proposal for what You could implement:

     

    To your List of Locations, add column Text called "Status" and make a mass edit to change all records to "Empty"

     

    Next, apply this code to the Button that is currently patching your Scanner input:

     

    Important make sure the names of Columns and Lists are maching and I did not make any mistakes I try place names to match Your Screens, but I could missspeal something.

     

    If(
     CountRows(
     Filter(
     Shelving,
     Status = "Empty"
     ).Titel
     ) <= 0,
     Notify("No Available Locations Make Space"),
     Set(
     varLoc,
     Patch(
     'Barcode Scans',
     Defaults('Barcode Scans'),
     {
     Titel: BarcodeScanner2.Value,
     'Barcode Type': BarcodeScanner2.Type,
     'Scanned Person':User().FullName,
     'Scanned time': Now(),
     Locatie: First(
     Shuffle(
     Filter(
     Shelving,
     Status = "Empty"
     )
     )
     ).Titel
     }
     )
     )
    );
    Patch(
     Shelving,
     LookUp(
     Shelving,
     Titel = varLoc.Locatie
     ),
     {Status: "In Use"}
    )

     

    Now the only process You will need to implement is when You will change the status of the Location back to empty if this will be a manual process when someone doing an audit and changing the status, or it will be automated example when the product will run out I leave this to You.

     

    hope this help

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard