1. Create a collection to store the table data temporarily. Use this code in the App OnStart or a button's OnSelect property:
ClearCollect(
TableData,
{ ImpactAssessment: "Management", Manhours: "", Cost: "", Quantity: "" },
{ ImpactAssessment: "Design", Manhours: "", Cost: "", Quantity: "" },
{ ImpactAssessment: "Construction", Manhours: "", Cost: "", Quantity: "" },
{ ImpactAssessment: "Material", Manhours: "", Cost: "", Quantity: "" },
{ ImpactAssessment: "Subcontractor", Manhours: "", Cost: "", Quantity: "" },
{ ImpactAssessment: "Schedule", Manhours: "", Cost: "", Quantity: "" }
)
2. Add a vertical gallery and set its Items property to:
TableData
3. In the gallery, for each row, add a Label to display ImpactAssessment. Set its Text property to:
ThisItem.ImpactAssessment
4. Add Text Input controls for Manhours, Cost, and Quantity. For each input, set its Default property to the corresponding column:
ThisItem.Manhours
5. Use the OnChange property of each input to update the collection. Example for Manhours:
Patch(TableData, ThisItem, { Manhours: TextInput_Manhours.Text })
6. Add a submit button. In its OnSelect property, use this code to save the table data and other form fields into the SharePoint list:
Patch(
SharePointListName,
Defaults(SharePointListName),
{
OtherField: OtherFormInput.Text,
TableDataColumn: JSON(TableData)
}
)
7. If you need to load existing data from SharePoint into the table when editing, use this code in the screen's OnVisible property:
ClearCollect(TableData, JSON(ParseJSON(SelectedSharePointItem.TableDataColumn)))
This process dynamically binds the gallery, allows user input, and saves the data in a single row in SharePoint as a JSON string.
If this helps kindly mark the answer as verified.