December 6, 200223 yr Newbies 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.
December 13, 200223 yr 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?
December 13, 200223 yr Newbies 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.
September 9, 200322 yr Newbies 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.
Create an account or sign in to comment