Hi,
I am building out an invoicing app, most the app is now built but I've got stuck on one part. The app is using a SharePoint list as its data source. This list contains the items that are added to the invoice, the two key columns in the list are:
CustomerRef - This is a unique identifier for the customer
Invoiced - This is set to "Yes", "No" or "n/a", this is a choice column. This shows the if the items has been invoiced.
Invoices are run once a week, in the app you select the customer which then populates a gallery with all the items that are due to be invoiced. The gallery has a filter that uses the "Invoiced" column to ensure that only items that haven't been invoiced yet are shown. I have a button that then goes off and produces a PDF invoice that is sent to the customer.
The bit I am getting stuck on is that I need to update all the items in the gallery and change the "Invoiced" field to "Yes". I've tried a few combinations of using the ForAll commands but either nothing happens or I get an error. I presume the fact that the column I am updating is a Choice column could be adding to my pain here.
Example formula's I've tried:
ForAll(gal_invoicing_hours.AllItems,
Patch(Invoices, ThisRecord,
{
Invoiced: "Yes"
}
)
If I try and wrap it in a collection I get a message that the "Invoiced" column doesn't exist
Collect(Invoices,
ForAll(gal_invoicing_hours.AllItems,
{
Invoiced:"Yes"
}
)
)
I know I am doing something wrong, please show me the light 🙂
ForAll(gal_invoicing_hours.AllItems,
Patch(Invoices, ThisRecord,
{
Invoiced: { Value: "Yes"}
}
)
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional