1 of 1 people found this helpful
this has been done in the past with a few of our customers using Flows. In short - a Process is to be created in Process Builder to watch for the creation of Task tickets (where the Incident field has been populated), or the update of Tasks where the Incident field has gone from empty to populated. The Action t use for the process is to call a flow. The steps of the flow is to perform the following:
1. Retrieve the Task record and Incident ID value from the Task ticket that invoked the flow
2. Using the Incident ID value, search all Tasks that have the Incident ID field value matching that of the Incident ID
3. Increment a 'counter' variable (using a loop) that stores the count number (for every task that is found with a matching Incident ID)
4. Once the loop has finished, write the 'counter' value to a custom (number) field in the Incident record
5. You can modify the loop to perform and meet both of your requirements:
5.1 Count the number of tasks that are related to the Incident
5.2 Count the number of tasks that are Complete (closed)
6. Create a formula field (text) that builds the string that you want to display using the custom counter fields i.e. "4 of 6 complete"
1. Create your flow first
2. Create your process, (in process builder) to call the flow when a condition is met.