I have a form that will be filled out daily by my kitchen sites for the amount of meals served daily for people on our program. So far I am stumped at how at the end of the month a workflow can combine all these forms into one form per site with how many meals each person has had for billing to insurance and how many meals the site overall served for cost calculations. Any ideas?
Question
Question
How to take a month's worth of submitted forms and combine into one
Answer
Since the Search Repository activity returns a list of entries, to go through its results you would use a For Each Entry activity. Please see below for some Workflow logic that creates a Total Count token starting at zero, searches for whatever entries you want, and cumulatively adds each daily form entry's to that Total Count token, which at the end will contain that monthly total that you want. You can then use it however you need.
Replies
I think you could have Forms save the submission to Laserfiche and set the instance ID and submission ID as field values.
Workflow could run on a schedule, search for all documents created within the past month, and for each one read the instance ID and submission ID from its fields.
The Workflow could run Retrieve Forms Content on each specified instance and get the table data. From there you could perform any calculations you need.
What version of workflow are you using? It appears I don't have that as an activity.
The screenshot is from WF10. In 9.2 it would be called Retrieve Laserfiche Forms Content.
Ok got it. I apologize as I am very new to the software (my first time using it was at Empower last month), What would the next step be? I tried "for each row" but could not find an activity that would work.
Since the Search Repository activity returns a list of entries, to go through its results you would use a For Each Entry activity. Please see below for some Workflow logic that creates a Total Count token starting at zero, searches for whatever entries you want, and cumulatively adds each daily form entry's to that Total Count token, which at the end will contain that monthly total that you want. You can then use it however you need.
So I was just given some new information on this whole setup. It turns out that each client we serve has a folder in the repository that has meta data fields for:a unique client ID, and a site name along with fields for each month that store meals served per month(entered manually). If I were to start this project over is there a better way to build this whole process?
What I would do is have the daily forms insert the numbers to a table on your SQL server. Then you have a Workflow that is scheduled to run on the last day of each month. The Workflow would start with a SQL query to retrieve the totals you need as tokens, then have the WorkFlow start the business process in Forms.
I like Miruna's idea. Another way you could do it, if you have the resources is to create a SQL database with a table that would hold the values from each submitted form. So Forms would kick off a workflow that would insert the necessary data into the database table. Then you can create reports and run queries directly from SQL using any set of parameters you want.
We do this for a lot of different Forms processes that we need to later run different reports on.