Reputation: 137
There are well known issues concerning Rich Text Fields.
I'm handling some modification requests, among which changing the hide properties on a Rich Text Field, so that the image it contains gets shown on preview, and not only on edit; the changes work as expected on newly created documents.
But documents created before the changes are keeping the old "hide-when" properties.
Is there any way to force the change on old documents, or will they have to be created from scratch?
Upvotes: 0
Views: 271
Reputation: 12060
Unfortunately there is no way to manipulate Hide- When- Formulas of existing RichtextItems out of the box. To get rid of the old hide whens you need to:
As pointed out by Stan in the comments: You could also export the document as XML, modify the Hide- Whens and then reimport. The only downside: Not everything in a notesdocument is completely round-trippable, and you might lose some formatting.
An even "less" invasive approach would be to export the document as
DXL, modify the HideWhens, import as ANOTHER document and then use default document operations to just "exchange" the richtextitem in the original document.
Exported XML could look like this, Text find- and replace is not to hard to do:
<item name='Body' sign='true' seal='true'>
<richtext>
<pardef id='1' leftmargin='1in' rightmargin='100%'/>
<par def='1'/>
<pardef id='2'>
<code event='hidewhen'>
<formula>PleaseHideMe = @True</formula>
</code>
</pardef>
<par def='2'>This is hidden text</par>
<pardef id='3'/>
<par def='3'/>
<par def='3'/>
</richtext>
</item>
Upvotes: 3
Reputation: 137
A possible workaround could be creating another RTF and using either an agent or the QuerySave property to create a new attachment and paste it in the new field.
This should work, but looks messy, to say the least.
Upvotes: 0