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

Report
All responses (
Answers (