AnsweredAssumed Answered

FindEventFramesByAttribute don't search EventFrames by Attribute with symbols backslash and  * together

Question asked by nasipov on Mar 18, 2015
Latest reply on Mar 20, 2015 by Eugene Lee

Hello all,

I am using function FindEventFramesByAttribute for get event frames by value of attribute, which contains text "Element\SubElement". 

If delete backslash from value of attribute and change text of searching, then run function will work and return event frames.


My program:

int startIndex = 0;

int maxCount = 4096;

inName = "Element\\SubElement*";

  AFAttributeTemplate afAttrTemplate_analog = afDatabase.ElementTemplates["AnalogValue"].AttributeTemplates["ElementPath"];

  afAttrTemplate_analog.IsIndexed = true;

  AFAttributeValueQuery afAttrValueQuery_analog = new AFAttributeValueQuery(afAttrTemplate_analog, OSIsoft.AF.Search.AFSearchOperator.Equal, inName);

  AFAttributeValueQuery[] afAttributeValueQueries = new AFAttributeValueQuery[] { afAttrValueQuery_analog };

  tmpList = AFEventFrame.FindEventFramesByAttribute(

   null, // - search all Database


   afStartTime, // time point to start search (forward or backward)


   null, // name Filter

   null, // referencedElementNameFilter

   null, // duration Query


   true,  // searchFullHierarchy

   AFSortField.StartTime, // sort field

   AFSortOrder.Ascending, // sort order