cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Silva_BR
Helper III
Helper III

Sending multiple records to sharepoin

Hello everyone!

I'm having a problem sending 55 records from Power Apps to Sharepoint using the ForAll + Patch function.With few records the formula was working but for many it wasn't.I'm using Power Apps in Portuguese so if you want to replicate the code, change it; by , and ;; per ;.

         ForAll(GalSimula.AllItems;
          Patch(Item_Simula;{
            Linha:dpLP.Selected.Value;
            LB:Value(lLB.Text);
            SKU: Value(lSKU.Text);
            Descricao:IDescrição.Text;
            Qtd:Value(lQTD.Text);
            PesoBR:If(ModElu.Selected.Value="Construção Civil"; Value(iPeso.Text);0);
            CTFix:Value(lCTFix.Text);
            CTVar:Value(lCTvar.Text);
            Premio:Value(lPremio.Text);
            LME:If(ModElu.Selected.Value<>"Construção Civil";Value(lLME.Text);0);
            CM:Value(lCM.Text);
            OCIO:Value(lOcio.Text);
            BF:If(CanalElu.Text="MI";0; Value(lPremio.Text + lLME.Text) * 0,001);
            RULE:Value(IRule.Text/100)
            ;Simulacao:{Id:VarPatch.ID;Value:VarPatch.Simulacao}
          })
          );;

Thank you all

 

3 REPLIES 3
berofeev
Helper I
Helper I

Hi @Silva_BR,

 

Perhaps try patching your entire collection in one go instead of forall?

 

https://matthewdevaney.com/patch-multiple-records-in-power-apps-10x-faster/

Hi,
thanks for the suggestion but in my case it doesn't work, since I need to send new records and not update.

And the problem is that few records are updated and larger amounts are not. But thanks for taking the time and I'll use it later to update.

berofeev
Helper I
Helper I

Hi @Silva_BR,

 

When your larger (55) sized collection, are you getting any of the records written to sharepoint, or do none of them get written? 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,784)