SNTT: Using Special Text in HTML Views

For those of us who have been working with Notes for a long time, we know the frustrations of dealing with @Functions that return Special text.  These formulas include:

  • @DocDescendents
  • @DocChildren
  • @DocLevel
  • @DocSiblings
  • @DocParentNumber
  • @DocNumber

While you can't use the results of these functions in any other formulas, you can use the values in Javascript that you embed within the view column.  For example, I use the @DocLevel function to help me indent responses in a document hierarchy.  I set a JS variable using this formula: 

"var ind = (" + @Text(@DocLevel) + "-2)*15;"

Then I use the following JS function to generate the TD tag: 

"document.write('< td class=\"response\" colspan=1 style=\"padding-left:' + ind + 'px;\">');

It's just that simple to get the Special Text to work for you.

<< Previous Document / Next Document >>
    Be the first in the world to comment on this entry!!!

Discussion for this entry is now closed.