Applied Users Forums

General Topics => Helpline => Topic started by: Sara Lieser on September 28, 2010, 07:28:16 PM

Title: Form Letters - ask variable
Post by: Sara Lieser on September 28, 2010, 07:28:16 PM
I have a document in which I want to use the "ask variable" in order to fill the producer's first name only, and it needs to appear more than once in the letter.  Is it possible to use the "ask variable" and have a single answer appear in multiple places in the document?
Title: Re: Form Letters - ask variable
Post by: Bloody Jack Kidd on September 28, 2010, 07:48:05 PM
my gut answer is yes - but the ask_variable thing is not something I have a lot of experience with
Title: Re: Form Letters - ask variable
Post by: Lance Bateman on September 28, 2010, 07:52:53 PM
Yes, it's possible.  Once the variable is defined in your "ask", you can place that variable later in the document - and I don't think you repeat the whole "ask".
Title: Re: Form Letters - ask variable
Post by: Jim Jensen on September 29, 2010, 09:15:12 AM
When you create the ask variable, it asks you to give the 'field' a name. In the ask variable details, it shows up just before your ask question. You should be able to include this anywhere after that in the document by inserting the variable name in brackets   {name}. I haven't done it in a while and would have to try to find a document containing it to verify - someone else can perhaps fine tune the directions. I haven't don't it since moving to Office2007 and am slow about finding some items yet.
Title: Re: Form Letters - ask variable
Post by: Jeff Zylstra on September 29, 2010, 10:08:38 AM
Sounds like maybe an "IF" variable might be more of what you're looking for.  This is completely off the top of my head, but ".IF <producer>="John Smith","John","".   You could put several "lines" of "code" in the document, one for every producer.  Although looking at the raw form letter document would show these lines, they would not print or alter the layout of the document.  If the IF statement is true, it would just insert "John" wherever it was used, which could be anywhere in a sentence or paragraph.

P.S.  Can't remember if it's Graham or Ian Blundell, but one of both are pretty good with TAM form letters.  Better than I am, anyway.
Title: Re: Form Letters - ask variable
Post by: Lance Bateman on September 29, 2010, 01:22:00 PM
Whether to use "If" or "Ask" - pretty much up to how many possibilities you have.  If you have lots of possibilities (over 5 would be my limit), I'd use the "Ask".  And as mentioned in another thread - once the variable is defined, you can use just the variable (without repeating the Ask command) later in the document.

Quote from: Jeff Zylstra on September 29, 2010, 10:08:38 AM
Sounds like maybe an "IF" variable might be more of what you're looking for.  This is completely off the top of my head, but ".IF <producer>="John Smith","John","".   You could put several "lines" of "code" in the document, one for every producer.  Although looking at the raw form letter document would show these lines, they would not print or alter the layout of the document.  If the IF statement is true, it would just insert "John" wherever it was used, which could be anywhere in a sentence or paragraph.

P.S.  Can't remember if it's Graham or Ian Blundell, but one of both are pretty good with TAM form letters.  Better than I am, anyway.