<?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=1142&amp;type=atom" />
	<updated>2023-04-12T07:10:13Z</updated>
	<generator>PunBB</generator>
	<id>https://itpmr.ru/viewtopic.php?id=1142</id>
		<entry>
			<title type="html"><![CDATA[Re: Удаление одного значения изз множественного поля]]></title>
			<link rel="alternate" href="https://itpmr.ru/viewtopic.php?pid=124923#p124923" />
			<content type="html"><![CDATA[<p>Удаление дублей значений в множественном поле. <br />В поле empty вносим только уникальные значения поля who.</p><p>Set item2 = doc.GetFirstItem(&quot;empty&quot;) &#039; удаление дублей who<br />Forall v In item.Values<br />If Not item2.contains(v) Then Call item2.AppendToTextList(v)<br />End Forall&nbsp; &nbsp; <br />doc.who=doc.empty<br />doc.empty = &quot;&quot;</p>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://itpmr.ru/profile.php?id=2</uri>
			</author>
			<updated>2023-04-12T07:10:13Z</updated>
			<id>https://itpmr.ru/viewtopic.php?pid=124923#p124923</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Удаление одного значения изз множественного поля]]></title>
			<link rel="alternate" href="https://itpmr.ru/viewtopic.php?pid=124920#p124920" />
			<content type="html"><![CDATA[<p>Этот код удаляет текущего юзера &quot;user&quot; с поля &quot;who&quot;, а потом по индексу idx удаляет его же данные с поля &quot;whois&quot;</p><br /><p>&nbsp; &nbsp; idx=Arraygetindex(doc.who, user)<br />&nbsp; &nbsp; Print &quot;idx&quot; idx<br />&nbsp; &nbsp; doc.empty=&quot;&quot;<br />&nbsp; &nbsp; Set itemtmp = doc.GetFirstItem(&quot;empty&quot;)<br />&nbsp; &nbsp; Forall z In item.values<br />&nbsp; &nbsp; &nbsp; &nbsp; If z&lt;&gt;user Then&nbsp; Call itemtmp.AppendToTextList(z)<br />&nbsp; &nbsp; End Forall<br />&nbsp; &nbsp; doc.who=doc.empty<br />&nbsp; &nbsp; doc.empty=&quot;&quot;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <br />&nbsp; &nbsp; Set item = doc.GetFirstItem(&quot;whois&quot;)<br />&nbsp; &nbsp; zz=0<br />&nbsp; &nbsp; Forall z In item.values<br />&nbsp; &nbsp; &nbsp; &nbsp; zz=zz+1<br />&nbsp; &nbsp; &nbsp; &nbsp; If zz &lt;&gt; idx Then&nbsp; &nbsp;Call itemtmp.AppendToTextList(z)&nbsp; &#039;&nbsp; индекс юзера<br />&nbsp; &nbsp; End Forall<br />&nbsp; &nbsp; doc.whois=doc.empty<br />&nbsp; &nbsp; doc.empty=&quot;&quot;</p>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://itpmr.ru/profile.php?id=2</uri>
			</author>
			<updated>2023-04-07T11:07:17Z</updated>
			<id>https://itpmr.ru/viewtopic.php?pid=124920#p124920</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Удаление одного значения изз множественного поля]]></title>
			<link rel="alternate" href="https://itpmr.ru/viewtopic.php?pid=124919#p124919" />
			<content type="html"><![CDATA[<p>В лотусе просто так нельзя удалить одн значение с множественного поля.<br />Например:<br /> idx=Arraygetindex(doc.who, user)<br />doc.who(idx) = &quot;&quot;&nbsp; &nbsp;ошибка<br />не работает.</p><br /><p>А надо:</p><p>Set item = docref.GetFirstItem( &quot;who&quot; )&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; valueArray=item.values<br />&nbsp; &nbsp; &nbsp; &nbsp; idx=Arraygetindex(valueArray, user)&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; If idx&gt;=0 Then <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; valueArray(idx)=&quot;&quot;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item.Values =&nbsp; Fulltrim(valueArray)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Set item = docref.GetFirstItem( &quot;whois&quot; )&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; valueArray=item.values<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; valueArray(idx)=&quot;&quot;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item.Values =&nbsp; Fulltrim(valueArray)<br />&nbsp; &nbsp; &nbsp; &nbsp; End If</p>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://itpmr.ru/profile.php?id=2</uri>
			</author>
			<updated>2023-04-07T08:03:13Z</updated>
			<id>https://itpmr.ru/viewtopic.php?pid=124919#p124919</id>
		</entry>
</feed>
