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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Writing a Collection t...
Power Apps
Answered

Writing a Collection to Sharepoint

(0) ShareShare
ReportReport
Posted on by 220

I have a button running the following formula:

 

ForAll(collectMultiscan,Patch('Thermostats & CO2', Defaults('Thermostats & CO2'), {Date: Now(), Employee: User().FullName, Customer: inputCustomer.Text, Title: PartNum, Description: Description, Quantity: Quantity}));

 

This is what it is returning:

Date            Title      Quantity Description                                               Employee Customer

8/20/2020CO2 Carbon Monoxide AlarmJohn DoeJones
8/20/2020Y87042TH6320U2008 3H/2C HP, 2H/2C Conv.John DoeJones
8/20/202018N772THX321WFS2001W 3H/2C HP, 2H/2C Conv.John DoeJones
8/20/2020Y87052TH6210U2001 3H/1C HP, 1H/1C Conv.John DoeJones

 

This is what it should return:

Date            Title      Quantity Description                                               Employee Customer

8/20/2020CO22Carbon Monoxide AlarmJohn DoeJones
8/20/2020Y87041TH6320U2008 3H/2C HP, 2H/2C Conv.John DoeJones
8/20/202018N771THX321WFS2001W 3H/2C HP, 2H/2C Conv.John DoeJones
8/20/2020Y87051TH6210U2001 3H/1C HP, 1H/1C Conv.John DoeJones

 

What am I doing wrong?

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Aimthedame 

    Formula looks good.  Can you review your collection through the Collection Viewer and verify if the results there are what you expect?

    I would guess there is something wrong in the collection.

     

    I hope this leads to some resolution for you.

  • Aimthedame Profile Picture
    220 on at

    I'm using the barcode scanner (my phone) so I it's hard to see the collection.

     

    This is the scanner formula:

    Collect(collectMultiscan, {PartNum: btnScan.Value, Description: LookUp(Inventory, LPN = btnScan.Value, DESC), Quantity: Quantity.Text})

     

    The "Sample value" collection data has no Quantity in the first row and then the three following rows Quantity contains "1".

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Aimthedame 

    Understood - always a challenge to use phone only features and try to troubleshoot without instrumentation enabled.

     

    On the surface - the collect formula appears fine as well, but there could be other factors to consider and you should narrow down the scope of where to look.

     

    What I would suggest is to put a Label on the screen and set its text property to :

        First(collectMultiscan).Quantity

    See what the Quantity value is when you collect something.

     

    Or, skip the label and put a small Gallery on the screen and set the Items property to collectMultiscan 

    Put a label in the Gallery and set test to ThisItem.PartNum & " - " & ThisItem.Quantity

     

    That would help facilitate understanding where to start looking.

     

  • Aimthedame Profile Picture
    220 on at

    Thanks to your Gallery suggestion I was able to fix my collection. I will definitely use that in the future.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 279 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 229 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard