We had heard of a similar request before and this was a proposed solution.
- Get the attribute_id value of the "status" column in your table. You can find the value by querying the cf_fields table in the Forms database.
- In your Forms business process, just configure it normally where the file uploads are saved to the repository.
- Create a workflow that has a starting rule where it watches for newly created entries. Set the conditions of the rule where it only gets triggered by the file uploads from the form submission getting created in the repository. This workflow will assign the corresponding "status" value to a metadata field associated with the file.
The workflow definition is pretty simple. The first activity is a delay. This is to give the Forms database the time it needs to get the entry id of the attachment in the repository. Essentially to avoid any possible race conditions. Next is a custom query activity that will basically find the "status" associated with that particular form file upload. Then the last activity just assigns that value to a field associated with that document.
As for the custom query, you'll need to know that attribute_id value mentioned above and the query parameters will just be the %(Entry ID) token.
select value from cf_bp_data where submission_id=(
select submission_id from cf_bp_data where bp_data_id=(
select bp_data_id from cf_bp_data_attachment_mapping where attachment_id=(
select attachment_id from cf_bp_attachment_data where lfentry_id=?)))
and substring(member_path, 0, charindex('.',member_path,0)) = (
select substring(member_path, 0, charindex('.',member_path,0)) from cf_bp_data where bp_data_id=(
select bp_data_id from cf_bp_data_attachment_mapping where attachment_id=(
select attachment_id from cf_bp_attachment_data where lfentry_id=?)))
and attribute_id=[your attribute_id value]
and value<>''
and value is not null
Here's a link to a video showing the POC - http://www.screencast.com/t/8cy2ma9mR
Note that the custom query has been confirmed to work in Forms 9 and 10, but keep in mind that the schema can always change in future versions so that's something to watch out for.