<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум компьютерной помощи &mdash; Поиск по базе с документами.]]></title>
	<link rel="self" href="https://itpmr.ru/extern.php?action=feed&amp;tid=784&amp;type=atom" />
	<updated>2022-01-11T08:15:53Z</updated>
	<generator>PunBB</generator>
	<id>https://itpmr.ru/viewtopic.php?id=784</id>
		<entry>
			<title type="html"><![CDATA[Re: Поиск по базе с документами.]]></title>
			<link rel="alternate" href="https://itpmr.ru/viewtopic.php?pid=124820#p124820" />
			<content type="html"><![CDATA[<p>Вот еще запросы для поиска по форме и непустому полю.</p><div class="codebox"><pre><code>uses &#039;incoming&#039; form   AND  date created is after 01.01.2021  AND  [Server_id] is present</code></pre></div><p>В русском клиенте</p><div class="codebox"><pre><code>используется форма &#039;incoming&#039;   AND  дата создания следует за 01.01.2021  AND  [Server_id] is present</code></pre></div>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://itpmr.ru/profile.php?id=2</uri>
			</author>
			<updated>2022-01-11T08:15:53Z</updated>
			<id>https://itpmr.ru/viewtopic.php?pid=124820#p124820</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Поиск по базе с документами.]]></title>
			<link rel="alternate" href="https://itpmr.ru/viewtopic.php?pid=123878#p123878" />
			<content type="html"><![CDATA[<p>Производит поиск документов по заданным критериям и найденные документы отображает в папке.</p><div class="codebox"><pre><code>(Declaration)
Dim session As NotesSession 
Dim db As NotesDatabase 
Dim doc As NotesDocument
Dim profile As NotesDocument
Dim collection As NotesDocumentCollection
Dim view As NotesView
Dim entry_collection As NotesViewEntryCollection

(Initialize)
Set session = New NotesSession

Set db = session.CurrentDatabase

Set doc = session.DocumentContext 

Set view = db.GetView(&quot;($profile)&quot;)
Set profile = view.GetFirstDocument

Call Search(doc) 

Sub Search(doc As NotesDocument)
Dim search_str As String
Dim searchConsultantType As Variant
Dim list_members As String
Dim coord_place As NotesDocument

Select Case doc.category(0)
Case &quot;0&quot; 
search_str = &quot;Form = &quot;&quot;consultrequest&quot;&quot;&quot; 
If doc.request_contact_person(0) &lt;&gt; &quot;&quot; Then search_str = search_str + &quot; &amp; &quot; + &quot;contact_person = &quot;&quot;&quot; + Trim$(doc.request_contact_person(0)) + &quot;&quot;&quot;&quot; 


Set collection = db.Search(search_str, Nothing, 0)
Set view = db.GetView(&quot;SearchResults&quot;) 
Set entry_collection = view.AllEntries
Call entry_collection.RemoveAllFromFolder(&quot;SearchResults&quot;) 
If collection.Count &lt;&gt; 0 Then 
Call collection.PutAllInFolder(&quot;SearchResults&quot;) 
Call view.Refresh 
End If 

Set coord_place = New NotesDocument(dB)
coord_place.Form = &quot;coordinator_place&quot;
coord_place.menu = &quot;SearchResults&quot;
coord_place.title = &quot;:: Результаты поиска  докуметов
coord_place.is_folder = 1
Call coord_place.ComputeWithForm(False, False)
Call coord_place.Save(True, True) 
Print &quot;[&quot; + profile.db_directory(0) + &quot;/&quot; + db.FileName + &quot;/0/&quot; + coord_place.UniversalID + &quot;?OpenDocument]&quot;

End Sub</code></pre></div><br /><br /><p>&gt; у юзверя права должны быть на папку и на запись общих доков<br />и зачем коллекция?<br />есть стандартное стредство поле Return в форме поиска<br /></p><div class="codebox"><pre><code>DBName:=@Subset(@DbName;-1);</code></pre></div><p>&quot;[[/&quot;+DBName+&quot;/вид для отображения результатов/?</p><div class="codebox"><pre><code>SearchView&amp;Query=&quot;+Query+&quot;&amp;SearchOrder=&quot;+@Text(Sort)+&quot;&amp;SearchMax=&quot;+@Text(MaxResults)+&quot;&amp;SearchWV=&quot;+@If(ExactMatch=&quot;&quot;;&quot;TRUE&quot;;&quot;FALSE&quot;)+&quot;&amp;SearchThesaurus=&quot;+@If(UseThesaurus=&quot;&quot;;&quot;FALSE&quot;;&quot;TRUE&quot;)+&quot;]]&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://itpmr.ru/profile.php?id=2</uri>
			</author>
			<updated>2013-05-22T09:19:42Z</updated>
			<id>https://itpmr.ru/viewtopic.php?pid=123878#p123878</id>
		</entry>
</feed>
