7 Replies Latest reply on Nov 10, 2017 2:36 PM by Rick Davin

    Issue with AFEventFrameSearch Constructor (AFDatabase, String, AFSearchMode, AFTime, AFTime, AFSearchToken.ToString(searchTokens.AsEnumerable))

    Sebastien-RtTech

      Hi,

         can't seem to get this working with AF 2.8.6 Client and AF server 2.8.0

      Issue with AFEventFrameSearch Constructor (AFDatabase, String, AFSearchMode, AFTime, AFTime, AFSearchToken.ToString(searchTokens.AsEnumerable))

       

      this line below works perfectly fine when declaring my AFEventFrameSearch this way

      Dim searchedObject = New AFEventFrameSearch(AFDBObject, strSubHeader, searchTokens)

       

      but doesn't work this way below and proves that my searchTokens are build correctly since the above returned results

      Dim searchString As String = AFSearchToken.ToString(searchTokens.AsEnumerable)

      Dim searchedObject = New AFEventFrameSearch(AFDBObject, "TempSearch", AFSearchMode.Overlapped, "2017-11-08T20:02:38.4642394Z", "2017-11-09T20:02:38.4652395Z", searchString)

       

      Error:

      {"Unrecognized search criteria '\\RTTECH-AF-280\RtDuet_Current\ElementTemplates[RtDuet Downtime Event]|Active'."}

       

      Now this will also return the error above.

      AFEventFrameSearch.ParseQuery(searchString )

       

       

      Here is what I do to build my AFSearchToken:

       

      Dim EventTemplateName As AFElementTemplate = AFDBObject.ElementTemplates(AFTemplateName)

      Dim attSearchTokenList As New List(Of AFSearchToken)

      attSearchTokenList.Add(New AFSearchToken(AFSearchFilter.Template, AFSearchOperator.Equal, EventTemplateName.GetPath()))

      attSearchTokenList.Add(New AFSearchToken(AFSearchFilter.Value, AFSearchOperator.Equal, "False", EventTemplateName.AttributeTemplates(attributeQueryItem.AttributeName).GetPath())

       

       

      Hope there is enough info and I can get help get this working.

       

       

      thanks