Hi @Lam01007 ,
Could you please share a bit more about your scenario?
Do you want to save the filtered items in point-3 into a "Mutliple lines of text" field in your SP list in a JSON format?
If you want to save the filtered items in point-3 into a "Mutliple lines of text" field in your SP list in a JSON format, I think the SubmitForm function could not achieve your needs.
As an alternative solution, please consider use Patch function to patch data into your SP list. Please set the OnSelect property of the "Submit" button to following:
Patch(
'YourSPList',
Defaults('YourSPList'),
{
MultiFiledColumn: JSON(ShowColumns(Collection1, "Title", "Category", "Region"))
}
)
In addition, if you want to load the JSON string result from the "Mutliple lines of text" field in your SP list into the Data Table control when you open the form, I afraid that there is no direct solution to achieve your needs in PowerApps.
As an alternative solution, you could consider pass the JSON string result from your app to a flow, then within the flow, convert the JSON string result into a Table, then return the Table value back to your app.
I have made a test on my side, please take a try with the following workaround:
Flow's configuration as below:
Within the "Response" action, set the Body field to following formula:
json(outputs('Compose'))
set the "Response Body JSON Schema" field to following:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string"
},
"Category": {
"type": "string"
},
"Region": {
"type": "string"
}
},
"required": [
"Title",
"Category",
"Region"
]
}
}
Within your app, add a "Parse Result" button, set the OnSelect proeprty to following formula:
ClearCollect(Collection1, JSONResultParse.Run('The Multiple Filed value from the opened form'))
Note: The JSONResultParse represents the name of above flow.
If you created a custom form in your SP list using PowerApps, please consider set the OnEdit proeprty of the SharePointIntegration to following:
EditForm(SharePointForm1);
ClearCollect(Collection1, JSONResultParse.Run(SharePointForm1.Selected.MultiFiledColumn)) /* <-- Add formula here */
When you edit the submitted record in your custom form, the Collection1 would be populated with result the "Mutliple lines of text" field of the current record.
More details about the firing a flow (Microsoft Flow) from a PowerApps app, please check the following article or video:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows
https://www.youtube.com/watch?v=1wl9AtxWdkg
Best regards,