Hi, everyone!
I'm a beginner in PowerApps and I'm working on a project that would track the Delivery Receipt (DR) documents. Our process is that the DRs are first Printed in our Plant, then Passed to Sales, then Passed to Client.
I made a SharePoint list where the DR references can be entered per row. The other columns showing the date of when it was printed, another date column for the date when it was passed to Sales, and another date column showing when it was passed to client. Then, I have a choice column showing 'Status', whether it has just been "Printed", "Sent to Sales", and "Sent to Client". So overall, I have these basic columns:
| DR Reference | Client Number | Date Printed | Date Sent to Sales | Date Sent to Client | Status |
| 123 | 50000001 | Jan 1, 2021 | Jan 3, 2021 | Jan 5, 2021 | Passed to Client |
| 124 | 50000001 | Jan 1, 2021 | | | Printed |
I made it this way since they would also like to download these info after, from the SharePoint list.
Anyway, the purpose of the app is to basically list down the DRs, filter accordingly, select which DR to update, and update a Date column and the Status column. So for example, if I were to update DR reference 124, I would update the 'Date Sent to Sales' column to whichever date I select and then update the 'Status' column to "Sent to Sales". Then, the person from Sales who received the DR would update the "Date Sent to Client" date column and update the 'Status' column to "Sent to Client".
I have already set up my app, with the search boxes and a date dropdown for the user to filter the gallery view accordingly. The gallery view also already has a check box.
My next step is setting up the button that would update those checked and update 2 columns (one of the 3 date columns and the status column).
I have tried following a Youtube tutorial about this, but it only updates one column. So far, my check boxes already have the following formulas:
OnCheck
Collect(colUpdates,ThisItem)
OnUnCheck
Remove(colUpdates,ThisItem)
Then I tried updating one column for now for one button. The 'DropdownStatus' is a drop down for the user to select which status they want to be the new status for the selected DRs while the 'Sample Document Tracking 2' is the name of the SharePoint list.
UpdateIf(
colUpdates,
true,
{Status:DropdownStatus.Selected});
Patch(
'Sample Document Tracking 2',
colUpdates)
This one works, but again, it only updates one column, specifically the status column.
I made another button to update a specific column. The 'Date Sent to Sales Admin' is a date column.
UpdateIf(
colUpdates,
true,
{'Date Sent to Sales': DateUpdateSentToSales.SelectedDate});
Patch(
'Sample Document Tracking 2',
colUpdates)
again, this also works, but it only updates one column per button.
How to incorporate in one button, but would update 2 columns in one click?