Applied Users Forums

General Topics => Helpline => Topic started by: Lance Bateman on August 30, 2011, 07:48:46 PM

Title: To Trim string field variable in TAM/Word Proposal?
Post by: Lance Bateman on August 30, 2011, 07:48:46 PM
I'd like to only pull in the last 4 characters of a variable that is used in a replicating table (drivers license number) - for privacy reasons.  The other option is to just not include that in the proposal.

Not sure how to do this in TAM/Word.  The handouts I have don't get into this.

Any ideas?

Title: Re: To Trim string field variable in TAM/Word Proposal?
Post by: Mark on August 31, 2011, 09:07:16 AM
Quote from: Lance Bateman on August 30, 2011, 07:48:46 PM
I'd like to only pull in the last 4 characters of a variable that is used in a replicating table (drivers license number) - for privacy reasons.  The other option is to just not include that in the proposal.

Not sure how to do this in TAM/Word.  The handouts I have don't get into this.

Any ideas?

Usually this would be Right(FIELDNAME,4) but I don't know how/if that applies to Word
Title: Re: To Trim string field variable in TAM/Word Proposal?
Post by: Lance Bateman on August 31, 2011, 01:44:10 PM
Thanks, Mark - yes, in Excel I have no problem playing around with things like this, but in Word - well, I need help structuring the language, not sure what works and what doesn't in Word.

If someone can tell me how to do the substring<field> command - especially if the negative start, then positive length aspect works - that would solve it.
Title: Re: To Trim string field variable in TAM/Word Proposal?
Post by: Mark on August 31, 2011, 01:49:05 PM
Well, unfortunately, this is what I find: http://www.wordbanter.com/showthread.php?t=80993
Title: Re: To Trim string field variable in TAM/Word Proposal?
Post by: Lance Bateman on August 31, 2011, 02:01:20 PM
Well, dammit - that's all I found also, except some references to java script which would have worked great - if we were in java.  I'd think there HAS to be a way to substring a field in Word????
Title: Re: To Trim string field variable in TAM/Word Proposal?
Post by: Mark on August 31, 2011, 02:02:38 PM
Maybe with VBA, as that thread implies, but not sure it's worth the effort and don't know how it would interact with the VBA that Applied uses to generate the document in the first place.
Title: Re: To Trim string field variable in TAM/Word Proposal?
Post by: Jeff Zylstra on August 31, 2011, 04:53:58 PM
I thought I saw a post from Ian at some point that had the TRIM function in it and worked on a TAM data variable in a proposal.   He'd be a good one, or maybe Todd Arnold.
Title: Re: To Trim string field variable in TAM/Word Proposal?
Post by: Mark on August 31, 2011, 04:55:00 PM
Quote from: Jeff Zylstra on August 31, 2011, 04:53:58 PM
I thought I saw a post from Ian at some point that had the TRIM function in it and worked on a TAM data variable in a proposal.   He'd be a good one, or maybe Todd Arnold.

that may have been done in extra criteria when running a report or search.  I don't think it's a feature in Word -- BUT, I have been known to be wrong.