Welcome, Guest. Please Login
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
Pages: 1
Send Topic Print
find how deep the overall outline goes (Read 1478 times)
Mark Anderson
YaBB Administrator

User - not staff!

Posts: 5689
Southsea, UK
find how deep the overall outline goes
Jun 04th, 2013, 12:33pm
I wanted to check this for a TBX, and came up this rule:

$MyString = max(collect(find($OutlineDepth>1),$OutlineDepth))

As find() returns a list of paths, we wrap it in a collect() to collect a list of $OutlineDepth values. Or use collect_if():

$MyString = max(collect_if(all,$OutlineDepth>1,$OutlineDepth));

If you've a rough idea of depth you could make max() check a smaller list by testing a higher base, e.g. $OutlineDepth>4. Also, if you know the deep part (in a big file) is in a certain branch, you could use a tighter scope than 'all'.
Back to top

Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print