I deleted some Rich Text Fields and created new ones on users request. Now the user says that they want the old data to be appearing in the new RTF’s in case of documents created before new design was installed.
The problem is that the data from old RTF doesnot appear in new RTF’s (editable). I used this formula as the default formula:
@if (NewField = “”; OldField; NewField)
This doesn’t seem to work. Any suggestions?
Thanx in advance
Subject: Renamed Rich Text Field issue
Don’t use the @If, to start. Just use OldField as the default value. RichText fields do not recompute after they have been created, so you only have to worry about the first time the document is edited. If the field is already on the form, i.e. visible in the document properties, then you have to delete the NewField through the back end and re-edit the document to pull in the OldField.
If there is anything in the new field, you have to be more careful because you don’t want to lose any data, but you can’t use your formula because the field will not be recomputed. But you can get the OldField and the NewField as rich text items and use the .AppendRTItem method to insert the old data into the new field. Read up on it in the designer help.
Subject: RE: Renamed Rich Text Field issue
Thanx Robert for your response.On the form, I renamed the new RT field names with that of the old names (I decided to revert as there were a large no of documents created with old RT field names and only a few with the new ones).
Then I created an agent and ran it on all new documents (depending on view selection).
The agent had something like this:
FIELD OldRTField := newRTField;
FIELD newRTField := @DeleteField
Thanx again…