cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dyee4614
Helper V
Helper V

Reducing Data Submission Time

I store my data using collections so in the app it's pretty fast.  However, the data submission process is pretty slow.  I was wondering if anyone had any tips to help speed up the time for users.  It takes about 9 seconds to submit and users can have 20-40 entries per submission.  I know I have a ton of columns so it might just be how it has to be but I wanted to check to see if any of you app geniuses had any ideas.

 

Here is my code.

ForAll(SubmitData,Patch(h2a2,Defaults(h2a2),
{
ID:ID,
Counter:Counter,
ddate: ddate,
User: User,
Location: Location,
RM: RM,
MaxOccupants: MaxOccupants,
Comment: Comment,
CommentType: CommentType,
CloseDate: CloseDate,
Status: Status,
Q1:Q1,
Q2:Q2,
Q3:Q3,
Q4:Q4,
Q5:Q5,
Q6:Q6,
Q7:Q7,
Q8:Q8,
Q9:Q9,
Q10:Q10,
Q11:Q11,
Q12:Q12,
Q13:Q13,
Q14:Q14,
Q15:Q15,
Q16:Q16,
Q17:Q17,
Q18:Q18,
Q19:Q19,
Q20:Q20,
Q21:Q21,
Q22:Q22,
Q23:Q23,
Q24:Q24,
Q25:Q25,
Q26:Q26,
Q27:Q27,
Q28:Q28,
Q29:Q29,
Q30:Q30,
Q31:Q31,
Q32:Q32,
Q33:Q33,
Q34:Q34,
Q35:Q35,
Q36:Q36,
Q37:Q37,
Q38:Q38,
Q39:Q39,
Q40:Q40,
Q41:Q41,
Q42:Q42,
Q43:Q43,
Q44:Q44,
Q45:Q45,
Q46:Q46,
Q47:Q47,
Q48:Q48,
Q49:Q49,
Q50:Q50,
Q51:Q51,
Q52:Q52,
Q53:Q53,
Q54:Q54,
Q55:Q55,
Q56:Q56,
Q57:Q57,
Q58:Q58,
Q59:Q59,
Q60:Q60,
Q61:Q61,
Q62:Q62,
Q63:Q63,
Q64:Q64,
Q65:Q65,
Q66:Q66,
Q67:Q67,
Q68:Q68,
Q69:Q69,
Q70:Q70,
Q71:Q71,
Q72:Q72
}));
Clear(SubmitData);Set(Counter,1);ClearCollect(Counter2,Counter)
4 REPLIES 4
RezaDorrani
Dual Super User II
Dual Super User II

Hi @dyee4614 

 

check this post

https://baizini-it.com/blog/index.php/2018/01/11/powerapps-replace-the-defaults-function-to-improve-...

 

The more the number of columns, the more time it would take to add the record

Also, since running in a for loop it would do it one at a time

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

@RezaDorrani  Thanks for the post!  This is exactly what I was looking for! I will update the code and see if I notice any improvements speed-wise.

 

Based on your post, it also sounds like there might be better options than ForAll.  If there is, please let me know what else is out there for submitting a collection w/ multiple entries.  

 

Hi @dyee4614 

 

I am curious to know about the results by making the default updates

 

ForAll replace could be with updateif but you are creating items so that is a different case

 

Another option could have been to post the data as a collection to Flow and flow can then post the data

User can get message that data request submitted and once the items are updated via Flow user gets notified

but may not be the best user expereience

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

@RezaDorrani I'm sorry, I forgot to respond to this.  It dropped it down to 9 seconds from 13.

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!

Top Solution Authors
Top Kudoed Authors
Users online (56,335)