<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум компьютерной помощи &mdash; Удаление одного значения изз множественного поля]]></title>
		<link>https://itpmr.ru/viewtopic.php?id=1142</link>
		<atom:link href="https://itpmr.ru/extern.php?action=feed&amp;tid=1142&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Удаление одного значения изз множественного поля».]]></description>
		<lastBuildDate>Wed, 12 Apr 2023 07:10:13 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Удаление одного значения изз множественного поля]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124923#p124923</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Wed, 12 Apr 2023 07:10:13 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124923#p124923</guid>
		</item>
		<item>
			<title><![CDATA[Re: Удаление одного значения изз множественного поля]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124920#p124920</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 07 Apr 2023 11:07:17 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124920#p124920</guid>
		</item>
		<item>
			<title><![CDATA[Удаление одного значения изз множественного поля]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124919#p124919</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 07 Apr 2023 08:03:13 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124919#p124919</guid>
		</item>
	</channel>
</rss>
