Hi,
Im trying to build an editable table similar to this
https://matthewdevaney.com/power-apps-excel-style-editable-table-part-1/
However im stuck on building a save button that looks for all the items in a gallery and patches the collection of items if the toggle has changed.
The code i was given in the tutorial was this, it differs from mine by i dont wish to upload to sharepoint collection i just want to update the current collection and i just cant get the code right, see my code below
ForAll(
Filter(
gal_EditableTable.AllItems,
tog_isChanged.Value
) As ChangedRows,
Patch(colUpdates,
Defaults(colUpdates), {
ID: ChangedRows.ID,
ItemNumber: ChangedRows.txt_ItemNumber.Text,
Description: ChangedRows.txt_Description.Text,
Quantity: Value(ChangedRows.txt_Quantity.Text),
Location: ChangedRows.txt_Location.Text
})
);
// Update SharePoint with new values
Patch('Inventory Count', colUpdates);
Clear(colUpdates);
// Return gallery to view mode
Set(varGalleryMode, Blank());
IGNORE ITS THE CODE BELOW
ForAll(
Filter(
Gallery.AllItems,
tog_isChanged.Value
) As ChangedRows,
Patch(colDATA,ChangedRows,
{
GID:GID,
Sample: ChangedRows.GalSampleID_1.Text,
FROM: ChangedRows.GalFromM_1.Text,
TO: ChangedRows.GalToM_1.Text,
}
)
);
I know im on the right track..

Report
All responses (
Answers (