Directory Merge Issues

D

Divinite

I'm creating a directory merge for a client. I'm basing this off of a
file that I used successfully the last two years.

I have it setup correctly:
{ IF {MERGESEQ} = "1" "{Field1}"""}
{ SET Change1 {Field1} }{ IF {Change2} <> {Change1} "{Field1}
{Field2}" "{Field2}"}
{ SET Change2 {Field1}

In theory, it should be working just fine. It has worked just fine
before. However, when I go to preview the merge, it shows only the
"{Field2}" from the second IF statement.

I went back and looked at past files that have used this directly type
successfully and they were now all doing the same thing, even if they
worked before.

I've tried recreating the document, same thing. It did appear
correctly once, but without changing anything, just doing a refresh
(ctrl-A + F9) caused it to change back to just the 2nd IF again.

Any ideas as to what could be causing this issue?

Thank you in advance,
Jessica
 
P

Peter Jamieson

1. { MERGESEQ } is blank when you preview - it only has a numeric value
when you merge. FWIW { MERGEREC } will compare with "1" even during
preview, but may not be the correct value for your requirement.

2. In theory, at the beginning of the merge, you should set Change1 to a
value outside the range of Field1 (e.g. in some cases, setting it to ""
should work, but if field1 could take any alphanumeric value, you can
set it to a non-alpha value, e.g. a small inline graphic.

e.g.

{ IF { MERGEREC } = "1" "{ Field1 }{ SET Change2 "" }" "" }

The thing is that bookmark values remain as the /last value you set them
to/. In other words, nothing in your field code initialises the value of
Change2.

3. Maybe you mean { MERGEFIELD Field1 } etc. Or maybe not..


Peter Jamieson

http://tips.pjmsn.me.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top