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

Question

Question

SQL to find Instance_ID

asked on March 27

I have a form that has an Upload task.

I'm writing my attachments to a volume.  The name of the attachment files looks something like "4236f46a-dee4-49c5-8d6d-bebb63c5a706'

I can use the LaserficheForms.dbo.cf_bp_attachment_data table to see information about the file, but I'm unable to figure out how to get from this table to a table that has the submitted form's instance_id.

Any help is appreciated.

Thank You!! 

 

0 0

Answer

SELECTED ANSWER
replied on March 27

Something like this should work (at least on version 11 Update 5 which is 11.0.2311): 

SELECT 
  fv.bp_instance_id,
  ad.file_name
FROM formatted_variables AS fv
LEFT JOIN cf_bp_data_attachment_mapping AS am ON am.bp_data_id = fv.bp_data_id
LEFT JOIN cf_bp_attachment_data AS ad ON ad.attachment_id = am.attachment_id
WHERE ad.file_unique_id = '4236f46a-dee4-49c5-8d6d-bebb63c5a706'

 

1 0

Replies

replied on March 28

This is great!  I needed to add the convert to uniqueidentifer, but it worked perfectly after that!!

 

Thank You so much!!

 

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

Sign in to reply to this post.