cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Caloy
Frequent Visitor

Powerapps Slow Updating/Adding

Hi Everyone,

I am experiencing a slow updating and adding of records. How to get rid of this.

I have 8000+ items on my sharepoint list. I am using sharepoint online for my list.

Is there a way to speed-up my transaction?

For the code I am using patch function, see my code below:

 

For Adding a Record:
Patch(MRC_REQUESTSUM,Defaults(MRC_REQUESTSUM),
{
LastName:txtlastname.Text,
GivenName:txtgivenname.Text,
MiddleName:txtmiddlename.Text,
Sex:txtsex.Text,
Age:Value(txtage.Text),
MRN:txtpatid.Text,
Contacts:txtcontacts.Text,
Relationship:txtrelationship.Text,
BirthDate:dpbirthdate.SelectedDate,
RoomNo:txtroomno.Text,
HospNo:txthospno.Text,
RecordType:
{
'@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference",
Id:cbrecordtype.Selected.ID,
Value:cbrecordtype.Selected.Description
},
ModeRequest:
{
'@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference",
Id:cbmor.Selected.ID,
Value:cbmor.Selected.ModeRqstList
},
RequestDate:dpreqdate.SelectedDate,
AdmissionDate:dpadmidate.SelectedDate,
DischargeDate:dpdischdate.SelectedDate,
ReasonforRequest:cbreasonforrequest.Selected.Reason,
rfrOthers:txtothersrfr.Text,
AttndngPhysician:
{
'@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference",
Id:cbattphy.Selected.ID,
Value:cbattphy.Selected.FULLNAME
},
PickedUpBy:txtpickupby.Text,
PickedUpDate:dppickupdate.SelectedDate,
RequestStatus:
{
'@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference",
Id:cbreqstat.Selected.ID,
Value:cbreqstat.Selected.Description
},
Relation2Patient:txtrel2patient.Text,
ReleasedBy:txtrelby.Text,
Remarks: txtremarks.Text,
EncodeDate:Today()
}
);Refresh(MRC_REQUESTSUM);

For Updating:


Patch(
MRC_REQUESTSUM,
EditMedReq,
{
LastName: Upper(txtlastname_edit.Text),
GivenName: Upper(txtgivenname_edit.Text),
MiddleName: Upper(txtmiddlename_edit.Text),
Sex: txtsex_edit.Text,
Age: Value(txtage_edit.Text),
MRN: txtpatid_edit.Text,
Contacts: txtcontacts_edit.Text,
Relationship: txtrelationship_edit.Text,
BirthDate: dpbirthdate_edit.SelectedDate,
RoomNo: txtroomno_edit.Text,
HospNo: txthospno_edit.Text,
Remarks: txtremarkreq_edit.Text,
RecordType: {
'@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference",
Id: cbrecordtype_edit.Selected.ID,
Value: cbrecordtype_edit.Selected.Description
},
ModeRequest: {
'@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference",
Id: cbmor_edit.Selected.ID,
Value: cbmor_edit.Selected.ModeRqstList
},
RequestDate: dpreqdate_edit.SelectedDate,
AdmissionDate: dpadmidate_edit.SelectedDate,
DischargeDate: dpdischdate_edit.SelectedDate,
ReasonforRequest: cbreasonforrequest_edit.Selected.Reason,
rfrOthers: txtothersrfr_edit.Text,
AttndngPhysician: {
'@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference",
Id: cbattphy_edit.Selected.ID,
Value: cbattphy_edit.Selected.FULLNAME
},
PickedUpBy: txtpickupby_edit.Text,
PickedUpDate: dppickupdate_edit.SelectedDate,
RequestStatus: {
'@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference",
Id: cbreqstat_edit.Selected.ID,
Value: cbreqstat_edit.Selected.Description
},
Relation2Patient: txtrel2patient_edit.Text,
ReleasedBy: txtrelby_edit.Text,
EncodeDate: Today()
}
);
Refresh(MRC_REQUESTSUM);
Navigate(
scrMain,
ScreenTransition.None
);

I have a doubt that the reason why it has delay on powerapps is there is a collect and refresh function after patch. Is there a way that when i navigate on the main screen, the data that is added or updated will automatically refreshed?

 

Any reply would be so much appreciated.
Thanks,
Caloy

0 REPLIES 0

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,152)