
Announcements
Hi,
Below is the formula for storing data from two galleries into a SharePoint list.
Problem is that time taken to store 37 rows of data is more than a minute. Unable to figure out the cause and need your help.
Regards
Hi @Sam70 ,
It is because ForAll() is not designed to be a Loop, although it can work this way with considerable performance penalty as it does an individual Patch for each record. ForAll() creates a Table, which can be patched in one action provided its content is correct. For new records, this is simply a Table with field names and field types matching the list. Also can you please remember to post your code in Text as it saves re-typing here. This code is OCR'd, so please watch spelling. I am also assuming here all the controls are in the Gallery - if not remove the _Data reference.
Patch(
'Skill Data 2',
ForAll(
GalleryOverall.AllItems As _Data,
{
Title: _Data.OveAllLabel.Text,
'Skill Type': {Value: _Data.Label39.Text},
Scores: _Data.OvrAllComboBox.Selected.Value,
'User S':
{
Claims: "i:0#.f|membership|" & Lower(User().Email),
Department: "",
DisplayName: User().FullName,
Email: User().Email,
JobTitle: "",
Picture: ""
},
'Date S': Today()
}
)
);
Patch(
'Skill Data 2',
ForAll(
GalleryDiagnostic.AllItems As _Data,
{
Title: _Data.DiagLabel.Text,
'Skill Type': {Value: _Data.Label46.Text},
Scores : _Data.DiagComboBox.Selected.Value,
'User S':
{
Claims: "i:0#.f|membership|" & Lower(User().Email),
Department : "",
DisplayName: User().FullName,
Email: User().Email,
JobTitle: "",
Picture: ""
},
'Date S': Today()
}
)
);
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps