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
IsLocal test (Read 2767 times)
james a. foster
Full Member

Posts: 130

IsLocal test
Feb 02nd, 2017, 2:32pm
It would be nice to have a test for whether an attribute is local or still inheriting values. One nice way might be a function like $ATTRIBUTE.islocal() or $ATTRIBUTE.inheritsValues().

One can currently get this information by looking at the attribute. If it's in bold then it's local. But a function like the above would make it possible to have an agent that searches for the (many) times when one accidentally makes a variable local while testing out changes to the database.
Back to top
  IP Logged
Mark Anderson
YaBB Administrator

User - not staff!

Posts: 5689
Southsea, UK
Re: IsLocal test
Reply #1 - Feb 3rd, 2017, 3:54am
Generally, calling the attribute will give this state. IOW, to test if $MyString inherits for a given note, the query:


should return all notes with a local value. However this fails if the attribute is manually set to zero (number), false (boolean), never (date) or no value (all other types). I thought the the above test did - or did used to - work for these null values. I'd agree than an unambiguous test for a local value - including a locally set default - would be useful. Visual inspection doesn't scale well.
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