AnsweredAssumed Answered

AF Element.Refresh using AFSDK

Question asked by CarolPL on Aug 17, 2018
Latest reply on Sep 3, 2018 by rfox

I have an objective to ensure that all queries I make to
AFAttributes in any Element always return the latest result (checked in items
only) regardless of whether its value or formula has changed.

 

The simplest solution appears to use the AFElement refresh
method before I get a pointer to the Attribute I need once the Element has been
found as below                     
AFElement Elem = (AFElement) AFObject.FindObject(<Server\Element
path>);                       
Elem.Refresh();  // Ensure Element is current                   
AFAttribute Attr = AFAttribute.FindAttribute(<Required attribute name,
AFObject.FindObject((<Server\Element path>));

Does anyone know the impact of this ie if no changes then
minor performance or a full refresh is done regardless.

This may be done many times a second, but it appears to work
with minor performance impact even when changes are required, the only other
way I can think of is to use the notification events ie the AFElement.Changed
event

All comments welcome

Outcomes