AnsweredAssumed Answered

I have a list of Elements name, can I get the respective AFElements in one go?

Question asked by Suganya_Ganesan on Jan 20, 2016
Latest reply on Jan 22, 2016 by pthivierge

Hello,

 

I have a list of Elements name, can I get the respective AFElements in one go?

 

Currently I am using the below code, which is time consuming because I am passing only one query at a time.

Please suggest some solution to improve the performance.

 

 

Code Snippet:

 

List<string> objMeterList=new List<string> ();

 

foreach (string strMeterElement in objMeterList)

{

                   var MeterElement = AFElement.FindElements(obj_AFDatabase, null, strMeterElement, AFSearchField.Name, true, AFSortField.Name, AFSortOrder.Ascending, 100);

 

                    if (MeterElement.Count > 0)

                        MeterElements.Add(MeterElement[0]);

}

Outcomes