Update Collected allows you to update items in Podio that have been collected by a previous action in the flow. This is useful if you are searching for duplicates or wanting to update items that are related but have yet to have a connection to another item.
For example, our Billing Department sends out invoices for Clinic Visits for multiple Sites and creates a Fees Billed Item for the Service Type. This Invoice (Fees Billed) Item has Date Field for the Visit Date and one for the Invoice Date as well a Relationship Field to the Site and one to the Patient(s). When a new Invoice Item is created, we want to update the Billed Date date field to the Invoice Date on the Clinic Visit item.
Start the flow by selecting the Trigger from and add any Filters required.
Next, collect the referenced items. This can be done by using the Get Referenced Item(s), the Get Podio View or the Search for Item(s).
For this example, we Trigger on Created Items into Fees Billed Item. We set up one collector to follow the relationship to the Patient(s) Item and one to the Clinic Visits Item.
Next, add the For Each action and set up to do the below actions on the desired field. (This will be the same as the App you wish to Update)
Add the Sanity Check to perform a calculation on the referenced or found items. Here, we are checking three different fields. First, confirming that the Visit Item Patient ID is the same as the Referenced Patient ID from the Fee (Invoice). Next, checking that the Visit Type is the same as the Fee (Invoice) Type. Then we also check to make sure this Billed Date on the Visit has not already been updated.
Add the Update Collected action.
Add any Podio fields that will require an update.
Additional Options include:
- Silent - This Update will not show up in Podio notifications
- Hook Event - Option to trigger a hook event, thus triggering another flow if set (turned OFF by default)
- Authentication - This Update can be set to use the App or an Admin Member to make the Update
This flow will now Trigger on a new Invoice Item, loop through each Clinic Visit referenced through the Site relationship and update the correct Visit with the Invoice Date.
What if the Sanity Check failed above because the Billed Date had already happened? We can us the End to close this Sanity Check and add another IF Statement for this situation.
Add the End IF to close the Previous If(Sanity Check)
Then add a new Sanity Check, this time doing to the same calculation but changing the Date to be not equal to nothing, meaning a date has already been populated.
The add a Comment to notify the Invoice creator and anyone following the Invoice item.
Finally, Close the If Statement with another End If. Your For Each Loop with an If/Else condition has been created.