Hi @WarrenBelz
Here is my present code at moment it takes a bit of time when creating or updating the record and wanted to speed up my patching new or updating, currently am using a set to get the id from main list and pass it other lists.
Set(
varShowSpinner,
true
);
Set(
varMainRecord,
Patch(
MainProjectList,
If(
varMainRecordStatus,
Defaults(MainProjectList),
varMainRecord
),
{
Title: varCustomerRecord.Title,
'Transaction Date': Now(),
'Due Date': DatePickerDue.SelectedDate,
CustomerID: varCustomerRecord.ID,
'Project Status': Dropdown6.Selected,
AssignedTo: varCurrentUser.Title,
Notes: TextNotes.Text
}
)
);
If(
!IsBlank(TextNotes.Text),
Patch(
'Project Notes',
Defaults('Project Notes'),
{
Title: Now(),
Comments: Trim(varMainRecord.Notes),
Project: {
Value: varMainRecord.Title,
Id: varMainRecord.ID
},
ProjectID: Value(varMainRecord.ID)
}
);
ClearCollect(
colFilesOne,
ShowColumns(
AddColumns(
Gallery1_6.AllItems,
"base64",
With(
{
varDemoFromAttachmentControl: JSON(
Image3_10.Image,
JSONFormat.IncludeBinaryData
)
},
Mid(
varDemoFromAttachmentControl,
Find(
",",
varDemoFromAttachmentControl
) + 1,
Len(varDemoFromAttachmentControl) - Find(
",",
varDemoFromAttachmentControl
) - 1
)
)
),
"base64",
"Name"
)
);
AddMultiFiles.Run(
JSON(
colFilesOne,
JSONFormat.IndentFour
),
varMainRecord.ID
);
Clear(colFilesOne);
Set(
varShowForm,
false
);
Set(
varShowSpinner,
false
)
);