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

Writing a Collection to Sharepoint

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions

@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.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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".

 

@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.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (55,066)