Hello,
I have a problem with updating field values for dates. I saw a similar case in thread ID 121128 but it won't work for me, although I think it should.
Here is what I am doing:
Have a word template that needs filling in fields from database on runtime.
Fields are in tables. In case there is no date I set that value in column to 0 and all values go to their places in rows of table.
Then I call:
document.MailMerge.ExecuteGroup(table)
document.UpdateDocumentFields()
If I try to set field from quick parts -> fields -> IF
like this:
IF «ProjectEndDate» = 0 "ongoing" «ProjectEndDate»
I get «ProjectEndDate» everywhere, so no update. Tried also experimenting with quotes on 0 and projectenddate.
If I try to use ctrl+f9 and write it like this
{ IF «ProjectEndDate» = 0 "ongoing" «ProjectEndDate» \*MERGEFORMAT }
I get the result returned but also the whole expression:
01.2017 - 0 = "0"
"ongoing" 0 \* MERGEFORMAT ongoing
or
12.2016 - 8/22/2017 2:00:00
AM = "0" "ongoing" 8/22/2017 2:00:00 AM \* MERGEFORMAT
8/22/2017
Anyone can help about this?