Get Latest IterationID by using the FileName
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there a way to Get Latest IterationID by using the FileName ?
I am able to get the list of File Names using the Search Criteria , I would like to get the Latest Released iteration ID for each file by passing the file Name.
Dim SrcCond AsNew SrchCond
' search for files
Dim fileList As List(Of File) = New List(Of File)()
Dim bookmark AsString = String.Empty
Dim status As SrchStatus = Nothing
With SrcCond
.PropDefId = 8
.SrchOper = 1
.PropTyp = PropertySearchType.SingleProperty
.SrchTxt = "488278"
EndWith
'Create a search condition array
Dim SrcConds(0) As SrchCond
SrcConds(0) = SrcCond
With SrcCond2
.PropDefId = 22
.SrchOper = 3
.PropTyp = PropertySearchType.SingleProperty
.SrchRule = SearchRuleType.Must
.SrchTxt = Boolean.TrueString
EndWith
Array.Resize(SrcConds, SrcConds.Length + 1)
SrcConds(SrcConds.Length - 1) = SrcCond
While (status IsNothingOrElse fileList.Count < status.TotalHits)
Dim files As File() = m_serviceManager.DocumentService.FindFilesBySearchConditions( _
SrcConds,
Nothing, Nothing, True, True, bookmark, status)
If (Not files IsNothing) Then
fileList.AddRange(files)
EndIf
EndWhile
If (fileList.Count > 0) Then
'iterate through found files and display them in the search results list box
ForEach file As File In fileList
'create the list item that will wrap the File
Dim fileItem As ListBoxFileItem = New ListBoxFileItem(file)
m_searchResultsListBox.Items.Add(fileItem)
' Get Iteration ID for Each Item
Next file
Else
EndIf