Newbies _alien Posted December 6, 2002 Newbies Posted December 6, 2002 Is there any way to give regular users a way to create and modify simple merge documnets? Anyway to fake it? The only thing I could think of is a kludge of nested Substitute and GetField functions, but it's not as dynamic as I would like.
BobWeaver Posted December 13, 2002 Posted December 13, 2002 How dynamic do you want it? The nested substitute function method works pretty well. You can't do anything about text styles though. But, you can give the user the ability to create any body text and use any data fields in any position. What kind of features are you looking for?
Newbies Aeolia Posted December 13, 2002 Newbies Posted December 13, 2002 If you put the 'raw' merg text into a global field, and have placemarkers for the fields, using square brackets (or some such) around them to differentiate them from the rest of the text, a merge can be totally dynamic. You have a 'compose' layout and can include a bunch of buttons to auto-insert field placmarkers at the current cursor position in the field. Plus you can have placemarkers for current date and time and other system variables. Then you simply need a corresponding script to generate the output text (preferably to a related 'letters log' file). No need to use 'GetField'. No need to nest. Just use a series of Set Field steps one after the other, each dealing with the insertion of a single field in place of the corresponding placemarker. It's dead easy to set up and easy to maintain. Set Field [ LetterLog::BodyText, gLetterOne ] Set Field [ LetterLog::BodyText, Substitute(LetterLog::BodyText, "[FirstName]", FirstName ] Set Field [ LetterLog::BodyText, Substitute(LetterLog::BodyText, "[LastName]", LastName ] Set Field [ LetterLog::BodyText, Substitute(LetterLog::BodyText, "[DateDue]", DateDue ] Set Field [ LetterLog::BodyText, Substitute(LetterLog::BodyText, "[CurrentDate]", DateToText(Status(CurrentDate)) ] etc... Looks pretty dynamic to me.
Newbies Somnimedia Posted September 9, 2003 Newbies Posted September 9, 2003 I hoped to find a way to somehow use the FieldNames(dbname, "") design function to somehow accomplish this. I'm still looking. Nested/Sequential substitute is adequate, but some function/calc that would replace any occurrence of any field name with the contents of that field would make it truly dynamic and maintenance free.
Recommended Posts
This topic is 7746 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now