James, I've been doing Remedy for awhile now, and I'll be honest...I don't use TR much, and most people that DO use it, don't understand the intricacies of using it properly. DB is a good tool for determining if the current value is different than the currently stored in the DB value, and I use it regularly....the reason you don't see many examples of TR and DB used in the same qualification is because of how TR functions, which makes it somewhat irregular.
So, the reason that TR is tricky is because it doesn't indicate what you think it should. Upon initial inspection you would think that if TR is not null, that means that it's being changed...and if TR is null, that means it's not being changed...but if you took that definition, you would be entirely WRONG. TR being null means one of two things....either the value isn't being changed, or it's being changed to a null value...there is no way through a run-if to tell which. TR being NOT Null means that it's being set to that value...but says nothing about if that is a change or not. TR can be set to a value by actually being set to that value through the GUI, or it could be set to a value through push....again...the fact that TR is not null gives NO indication of if it's changing or not...so... a qualification of TR.Field=DB.Field would indicate that the initiation of the update was setting the field, and that it is being set to the same value as is currently there. The most common of 'oh no, that's not what you meant' that I've seen is the opposite of that though TR.Field != DB.Field....most people when they write that think they are saying 'the value is changing', but as described above...it doesn't....if the value isn't being set, that would be a true boolean, but not what the user thinks it should mean. oh...another caveat regarding the DB...if using DB during a Submit operation...the DB value will always be null...:) On Thu, May 8, 2014 at 9:21 AM, James Smith <bmcremedyarslis...@gmail.com>wrote: > Hi List, > > We can achieve things without using TR and DB values in a filter by just > using Field but I do not understand why they have been developed to use? I > have heard from many remedy developers like Misi and BMC who suggest not to > use TR and DB in Run If qualification of a filter but why? > > Why it is not recommended to use TR and DB values? > > What if I use TR.Field=DB.Field? Will it yield a correct result? In BMC > documentation also they have not given any example where they used TR and > DB together in a qualification. > > Appreciate your thoughts! > > Cheers, > James > > > _______________________________________________________________________________ > UNSUBSCRIBE or access ARSlist Archives at www.arslist.org > "Where the Answers Are, and have been for 20 years" > _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers Are, and have been for 20 years"