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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Scan Items into Galler...
Power Apps
Unanswered

Scan Items into Gallery, Update Location Listed Using Form

(0) ShareShare
ReportReport
Posted on by 22

Hi, I am having trouble with a delegation error when trying to transfer multiple scans with one submission. 

 

I have an inventory management app where the user wants to scan all of the items being transferred from one warehouse location into a gallery (e.g., 50 items), and then once the products to be transferred are scanned, they then select a new warehouse location for all of the products in the gallery. This is selected by way of a form. I am using a SP list as a database. "Pallet ID" is the unique identifier for existing records in SP. 

 

My syntax for submitting the change is as below:

 

 

 

ForAll(
 Gallery2.AllItems,
 Patch(
 'SP List',
 LookUp(
 'SP List',
 'Pallet ID' = Body1.Text
 ),
 {'Warehouse Location': DataCardValue29.Selected}
 )
)

 

My barcode scanner syntax is:

 

 

 

Collect(colScannedItems, {'Pallet ID': BarcodeScanner1.Value})

 

App screen below: 

Zachera_0-1678576655890.png

 

Is there any way to achieve what I want without the delegation error? 

 

Cheers

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @Zachera ,

    What type of field is 'Warehouse Location' and what is the Items property of DataCardValue29 (which I assume is in the Gallery) ?

  • Zachera Profile Picture
    22 on at

    Hi @WarrenBelz 

    Warehouse Location is a choice column (this is a form)
    DataCardValue29 items property is, "Choices([@'SP List'].'Warehouse Location')" - part of above. 

     

    The idea is that a barcode is scanned, goes into a Gallery for the user to see. Then once all of the scans are done, the user chooses which warehouse location that stock is transferred into by selecting an option from the form. 

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @Zachera ,

    I must admit I was expecting a different answer as what you have should be Delegable, but try this

    ForAll(
     Gallery2.AllItems As aGal,
     Patch(
     'SP List',
     LookUp(
     'SP List',
     'Pallet ID' = aGal.Body1.Text
     ),
     {
     'Warehouse Location': 
     {Value: aGal.DataCardValue29.Selected.Value}
     }
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Zachera Profile Picture
    22 on at

    Hi @WarrenBelz , 

     

    Hope fully this error is an easy fix. Thank you for your help so far

     

    Zachera_0-1678588437416.png

     

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @Zachera 

     

    That does not align with what you have posted - there are only two pieces of information I need to confirm

    • What type of field is 'Warehouse Location' ? It appears to be a Choice field from the Items of the Combo Box you posted (or is it a Lookup field). If either, is it single or multi-choice ?
    • The Items of the combo box you have already posted - is it a Single or Multi-selection ?
  • Zachera Profile Picture
    22 on at

    Hi @WarrenBelz,

     

    Warehouse location is a choice field - only one option is selectable. 

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    @Zachera ,

    OK this is making less sense how - you are saying

    • 'Warehouse Location' is a Single Choice field in SharePoint.
    • DataCardValue29 is a Single Choice Combo Box in your Gallery Gallery2 with the Items Choices([@'SP List'].'Warehouse Location'

    and this code

    ForAll(
     Gallery2.AllItems As aGal,
     Patch(
     'SP List',
     LookUp(
     'SP List',
     'Pallet ID' = aGal.Body1.Text
     ),
     {
     'Warehouse Location': 
     {Value: aGal.DataCardValue29.Selected.Value}
     }
     )
    )

    produces the error

    WarrenBelz_0-1678601831902.png

    The code is valid providing the points above are valid, so something is incorrect there - I suggest you start by putting a Label in the Gallery with DataCardValue29.Selected.Value and see if it reflects what is selected in the drop-downs.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard