<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.smt-x.com/index.php?action=history&amp;feed=atom&amp;title=ListLimitBasedOnValue</id>
	<title>ListLimitBasedOnValue - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.smt-x.com/index.php?action=history&amp;feed=atom&amp;title=ListLimitBasedOnValue"/>
	<link rel="alternate" type="text/html" href="https://wiki.smt-x.com/index.php?title=ListLimitBasedOnValue&amp;action=history"/>
	<updated>2026-04-03T23:16:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki.smt-x.com/index.php?title=ListLimitBasedOnValue&amp;diff=149&amp;oldid=prev</id>
		<title>Smtxwiki: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.smt-x.com/index.php?title=ListLimitBasedOnValue&amp;diff=149&amp;oldid=prev"/>
		<updated>2020-05-25T20:44:29Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:44, 25 May 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Smtxwiki</name></author>
	</entry>
	<entry>
		<id>https://wiki.smt-x.com/index.php?title=ListLimitBasedOnValue&amp;diff=148&amp;oldid=prev</id>
		<title>Smtxwiki: Created page with &quot;A formfield contains a comma seperated list of allowed values. another formfield showing a datastore parameter should be dynamically filtered based on the values in the comma...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.smt-x.com/index.php?title=ListLimitBasedOnValue&amp;diff=148&amp;oldid=prev"/>
		<updated>2016-12-19T10:06:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;A formfield contains a comma seperated list of allowed values. another formfield showing a datastore parameter should be dynamically filtered based on the values in the comma...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A formfield contains a comma seperated list of allowed values. another formfield showing a datastore parameter should be dynamically filtered based on the values in the comma seperated list.&lt;br /&gt;
&lt;br /&gt;
For example: &lt;br /&gt;
- Location A allows order types 1,2 and 3&lt;br /&gt;
- Location B allows order types 3,4 and 5&lt;br /&gt;
&lt;br /&gt;
When Location B is selected, the list with order types should only display the ordertypes with ID 3, 4 and 5.&lt;br /&gt;
&lt;br /&gt;
The solution is found in the creation of X hidden fields. X equals the maximum number of values in the comma seperated list. Each hidden field will contain 1 value and all hidden fields are used to set the condition in the dynamic filters on the datastore list.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The first value from the comma seperated list is retrieved like this:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
 indexof(&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||location||Available subtypes#&amp;#039;, &amp;#039;,&amp;#039;) == -1 ?&amp;lt;br&amp;gt;&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||location||Available subtypes#&amp;#039; : &amp;lt;br&amp;gt;substring(&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||location||Available subtypes#&amp;#039;, 0, &amp;lt;br&amp;gt;indexof(&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||location||Available subtypes#&amp;#039;, &amp;#039;,&amp;#039;))&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Now store the remaining string in another hidden field, like this:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 substring(&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||location||Available subtypes#&amp;#039;,&amp;lt;br&amp;gt;indexof(&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||location||Available subtypes#&amp;#039;, &amp;#039;,&amp;#039;)+1)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The second hidden field, should contain the second value from the list and is defined like this:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 indexof(&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||subtypeid1rest||#&amp;#039;, &amp;#039;,&amp;#039;) == -1 ? &amp;lt;br&amp;gt;&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||subtypeid1rest||#&amp;#039; : &amp;lt;br&amp;gt;substring(&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||subtypeid1rest||#&amp;#039;,0 , &amp;lt;br&amp;gt;indexof(&amp;#039;#REPLACE-FORMFIELD-Filterandfieldtest||subtypeid1rest||#&amp;#039;, &amp;#039;,&amp;#039;))&lt;br /&gt;
&lt;br /&gt;
After this, the remaining string is stored again, as explained previously. For every remaining hidden field the similar function as above should be used.&lt;/div&gt;</summary>
		<author><name>Smtxwiki</name></author>
	</entry>
</feed>