veljovic

FindElementsByAttributes

Discussion created by veljovic on Aug 21, 2014
Latest reply on Aug 22, 2014 by veljovic

Hi,

 

 

 

I am having a situation where the same code executed by 2 different clients gives different results, more specifically,

 

it is the function AFElement.FindElementsByAttribute which gives different results. Is this normal or it must be some

 

bug in my code?

 
      AFAttributeTemplate aTemplate =
        afDB.ElementTemplates["eTplName"].AttributeTemplates["aTplName"];
 
      AFElement searchRoot = afDB.Elements["eName"];
 
      AFAttributeValueQuery avq= new AFAttributeValueQuery(aTemplate, AFSearchOperator.Equal, aValue);
 
      AFAttributeValueQuery[] conditions = new AFAttributeValueQuery[1];
      conditions[0] = avq;
 
 
      var result = AFElement.FindElementsByAttribute(searchRoot, null, conditions, false, AFSortField.Name, AFSortOrder.Ascending, 1);

 

 

Cheers,

 

Slobodan

Outcomes