Conditioned Attachments with CF Director Project

ssolberg

VIP Member
I need to be able to condition adding of an Attachment (to be emailed with a form). I am doing this already with CreateStream Builder and 2.7 and now needing to replicate it with my Director Project 6.2

In CreateStream, you build the logic in the Job Ticket Mapping and were able to you If/Then/Else logic to decide which file to attach.

For example:
If Field1='FRED', use("Fred attachment.pdf" ELSE
If Field1='BOB', use("Bob attachment.pdf" ELSE... (you get the idea)

In Director, I can't seem to wrap my brain around the same setup from what I have read and see. It appears I need to setup User Variables at the Email node for each of the "attachement" logics? But then how do I tell Attachment1 in the Expression Builder which User Variable to use? I am clearly missing something real easy here.. Help?
 
Here's how its done.

You will need as many user variables on the email node as there are attachments BUT name all of them the same name (such as attachment).

Enter the condition thats required for each one
Enter the path and the name of the attachment for each attachment needed.

So, lets say there are 10 attachments
- You'll have 10 user variables all the same name
- Each has a specific condition
- Each has a specific value for the path and the file to be attached
- Then in your JTT parameter for the Attachment you simply choose the user variable (you'll see them multiple times, all the same name, doesnt matter which one you choose)

Director will then test the conditions and pick the correct attachment based on the result.

Mark
 
Yep, that did it. Thanks Mark! I thought about trying that but it went against my own logic to be able to work. I was so wrong.

Does the same "logic" apply to Designer and User Variables in Sections? Could you just use one variable name for a variety of varible subform definitions? I recently went had to do some variable subform work but I gave every "logo" a different variable name and conditioned the variable subform on each variable. I might have been able to make it a little simpler with just 1 variable subform and 1 user variable NAME but 5 different definitions of the variable for the 5 logos?

Just a thought. I have it working fine, just looking to see if I could streamline that a bit.
 
Good to hear, well done.

The same logic applies to user variables in the designer for variable subforms but you may run into logo sizing issues:
- If the subform is all text, no problem.
- If the subform is text and a logo, still should not have a problem (each logo's scaling settings can be independent on each subform)
- If the subform is just a logo, you may need to use the Autofit and Preserve Aspect Ratio settings since the variable subform tool does not offer different scaling settings for different logos.

Mark
 
Back
Top