You are viewing limited content. For full access, please sign in.



Forms SQL database - Report on all approved forms

asked on November 20

For this example, lets say process_id = 5 is a simple form that is filled out by the end user and then goes through 2 approval steps to be approved or rejected. If rejected, I believe the process ends and a new form must be submitted.  I am trying to write a query against the LFForms database to determine all forms that have been submitted, completed, and approved. So far I can query the cf_bp_main_instances table to retrieve all those processes. I have determined that status = 2 is completed and not in progress. This however does not tell me whether the form was approved or rejected. I have found cf_submissions has the action that was taken, I can pull the max submission_id per bp_process_instance and report on the last action taken. Or there is a table cf_bp_worker_instances that has a status, but it does not seem to correlate very directly with approved/rejected.


Can someone point me in a direction to better tell when the process has completed and is approved vs rejected? TIA

0 0


replied one day ago

Hi Jesse,

I think you are on the right track. The submission id is incremental, so pull the action of cf_submission with max submission_id within a completed main instance should work.

I am not sure whether you need to do this a SQL way or you can make use of Forms Reports. In Forms 9.2, the 'Current step' column in reports shows the end step for a completed instance. You can define different end step based on user task action (like the 'Form Approval' template) so that you can know of user task action in the reports. Also you can filter completed instance by state with report filter.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.