Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs







Recent posts

Mon 21 Jun 2021

Custom Domino Extensions presentation



Thu 10 Jun 2021

Notes 12 without all the blue



Wed 5 May 2021

Pull public data into Notes on the fly


January, 2022
SMTWTFS
      01
02 03 04 05 06 07 08
09 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

Search the weblog





























Genii Weblog

Working on Hide-When sample

Mon 11 Oct 2004, 09:57 AM



by Ben Langhinrichs
One of the interesting ways people use our Midas Rich Text LSX is to manipulate, and often get rid of, hide-when formulas.  The reason why getting rid of them is so important is explained more fully in Rich Text 101 - Hide-when formulas, but I'm sure many of you have experienced it.  A form has a rich text field with certain hide-when formulas, and after the hide-when formulas are changed or removed, the rich text is still hidden, or not hiding, as the case may be.  This is because the hide-when flags and formulas are stored in the rich text separately from the form.

In any case, these and more complex hide-when issues are fairly easily handled by Midas, but I wind up answering too many questions about how to set and clear and manipulate them, so I am working on a Hide-When sample database that will show both our Midas Rich Text LSX and @Midas Formulas setting and clearing hide-when flags and formulas on both documents and forms.  Some examples:

Using Midas Rich Text LSX to clear all hide-when flags and formulas
Set rtitem = New GeniiRTItem
Call rtitem.ConnectBackend(doc.Handle, "Body")
If rtitem.IsConnected Then
   rtitem.Everything.HideFormula = ""
   rtitem.Everything.ParagraphStyle = |
      -HIDE_WEB 
      -HIDE_NOTES 
      -HIDE_READ
     -HIDE_PREVIEW_READ 
      -HIDE_EDIT 
      -HIDE_PREVIEW_EDIT 
      -HIDE_PRINT 
      -HIDE_MOBILE 
      -HIDE_EMBEDDED 
      -HIDE_COPY|
   rtitem.Save
End If

Using @Midas Formulas to clear all hide-when flags and formulas
@DbCommand("Midas":"NoCache"; "HideFormula"; ""; @DocumentUniqueID; "Body", "");
@DbCommand("Midas":"NoCache"; "ParagraphStyle"; ""; @DocumentUniqueID; "Body", "-HIDE_WEB -HIDE_NOTES -HIDE_READ -HIDE_PREVIEW_READ -HIDE_EDIT -HIDE_PREVIEW_EDIT -HIDE_PRINT -HIDE_MOBILE -HIDE_EMBEDDED -HIDE_COPY);

Using Midas Rich Text LSX to replace text in hide-when formula
Set rtitem = New GeniiRTItem
Call rtitem.ConnectBackend(doc.Handle, "Body")
If rtitem.IsConnected Then
   Call rtitem.Everything.ReplaceText("LeadArbitrator", "Leader", "HIDE_FORMULA");
   If rtitem.Modified Then rtitem.Save
End If

Any requests
If you have any specific requests for this or any other sample db, let me know here or by e-mail to .

Copyright 2004 Genii Software Ltd.

What has been said:

No documents found