<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум компьютерной помощи &mdash; Переполнение поля истории 32К]]></title>
		<link>https://itpmr.ru/viewtopic.php?id=1094</link>
		<atom:link href="https://itpmr.ru/extern.php?action=feed&amp;tid=1094&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Переполнение поля истории 32К».]]></description>
		<lastBuildDate>Tue, 13 Oct 2020 11:31:24 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Переполнение поля истории 32К]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124798#p124798</link>
			<description><![CDATA[<p>1. в библиотеку library добавляем процедуру Transposition_History<br /></p><div class="codebox"><pre><code>%REM
    Sub Transposition_History
    Description: перемещение истории в другое поле
    сделано из-за 32к
%END REM
Sub Transposition_History(doc As NotesDocument)
    Dim item As NotesItem, idx_hist As Byte    
    
    max_value=20000 &#039;max кол-во байт которое должно быть в поле
    Set item = doc.GetFirstItem( &quot;history&quot; )        
    If item.ValueLength&gt;max_value Then
        idx_hist=0
        ForAll it In doc.Items
            If LCase(StrLeft(it.name,&quot;_&quot;))=&quot;history&quot; Then
                s$=Trim(StrRight(it.name,&quot;_&quot;))
                If s$&lt;&gt;&quot;&quot; And IsNumeric(s$)Then
                    If it.IsSummary Then it.IsSummary=False                        
                    If idx_hist&lt;CInt(s$) Then
                        idx_hist=CInt(StrRight(it.name,&quot;_&quot;))
                    End If                                    
                End If
            End If
        End ForAll
        idx_hist=idx_hist+1
        Call doc.CopyItem(  item ,  &quot;history_&quot;+Cstr(idx_hist) )
        Set item = doc.GetFirstItem( &quot;history_&quot;+Cstr(idx_hist) )    
        If item.IsSummary Then item.IsSummary=False                        
        doc.history=&quot;&quot;
    End If
End Sub</code></pre></div><br /><p>2.в глобалах формы подключаем библиотеку library (если не подключена)<br /></p><div class="codebox"><pre><code>Option Public
Use &quot;Library&quot;</code></pre></div><p>3.событие формы querySave вызываем<br /></p><div class="codebox"><pre><code>Call Transposition_History(uidoc.Document)&#039; перенос истории в другое поле  </code></pre></div><p>4. на форме где нужен перенос истории поле history делаешь вычисляемым<br />значение вычисляемого значения = history</p><p>5. под поле history кидаешь пару вычисляемых значений...<br />&lt;Computed Value&gt; history_3<br />&lt;Computed Value&gt; history_2<br />&lt;Computed Value&gt; history_1</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Tue, 13 Oct 2020 11:31:24 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124798#p124798</guid>
		</item>
	</channel>
</rss>
