cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sanderson82
Level: Powered On

Mass adding multiple records with count based on total (SP list)

I have a requirement to create a register for units to be produced.  Detail will be contract name (already in a dropdown from another source), unit name, volume(per unit), weight(per unit calculated from volume) and count (number to be produced).

 

If for example I make the following input in the app....

 

ContractUnitVolWeightCount
C123Type A0.561.4285

 

I would like the following recorded on the SP list to show 5 units are required each with a unique sequence number

 

ContractUnitVolWeightSequenceCount
C123Type A0.561.42815
C123Type A0.561.42825
C123Type A0.561.42835
C123Type A0.561.42845
C123Type A0.561.42855

 

I have a field called I_Seq with a default of 0 and using the following to Collect

Collect(
    Units,
    {
        Title: I_Contract.SelectedText.Value,
        Unit: Upper(I_Unit.Text),
        Volume: Value(I_Volume.Text),
        Weight: Value(I_Weight.Text),
        Count: Value(I_Count.Text),
        Sequence: Value(I_Seq.Text)+1
    }
)

Basically I think I just need this collect to run multiple times to the value of "Count"

 

Any help much appreciated

1 REPLY 1
yshariff
Level: Powered On

Re: Mass adding multiple records with count based on total (SP list)

You can import an excel table with the max amount of rows you think you might need with a column for sequence and the numbers already entered and then do a ClearCollect that collects all the rows that are equal or less than the count number entered and add the additional columns. You would enter something like this:

 

Button On Select Property:

 

ClearCollect(Units,AddColumns(Filter(ExcelTableOfRows,Sequence < Value(Count.Text)+1),"UnitsInfo",

ClearCollect(Units,AddColumns(Filter(ExcelTableOfRows,Sequence < Value(Count.Text)+1),"UnitsInfo",
{Title: I_Contract.SelectedText.Value, Unit: Upper(I_Unit.Text), Volume: Value(I_Volume.Text), Weight: Value(I_Weight.Text), Count: Value(I_Count.Text)})

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,959)