<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Dropdown/custom picker (to utilize auto suggestions) with the option to enter new values?</title><link>https://community.appian.com/discussions/f/user-interface/26620/dropdown-custom-picker-to-utilize-auto-suggestions-with-the-option-to-enter-new-values</link><description>Hello, 
 I&amp;#39;m looking for an text field (user input) which will auto suggest values (based on a database field). Afaik, that is something dropdown fields and with some more logical a customer picker can provide except they wont allow for new values to</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Dropdown/custom picker (to utilize auto suggestions) with the option to enter new values?</title><link>https://community.appian.com/thread/104972?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 10:07:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ac7f2b80-814a-4977-a576-b80abf664a6a</guid><dc:creator>BE.Thomas </dc:creator><description>&lt;p&gt;Yes, but I&amp;#39;m not sure if my usecase fit yours. I&amp;#39;ve adopted the pattern a bit&lt;/p&gt;
&lt;p&gt;That&amp;#39;s is the search function (with the keyword (or filter) added to the result):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!matches: where(
    a!forEach(
      items: ri!labels, 
      expression: search( ri!filter, fv!item)
    )
  ),
  a!dataSubset(
    data: union(index( ri!labels, local!matches), ri!filter), 
    identifiers: union(index( ri!labels, local!matches), ri!filter)
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Finally, I did not need to add the keyword to the customer picker because I was looking for a single value, so putting the result of the customer picker in a local variable was just fine for me:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!pickerFieldCustom(
  label: &amp;quot;Country&amp;quot;,
  labelPosition: &amp;quot;ADJACENT&amp;quot;,
  maxSelections: 1,
  suggestFunction: rule!ucArrayPickerFilter(
    filter:_,
    labels: local!countryList
  ),
  selectedLabels: local!selCountry,
  value: local!selCountry,
  saveInto: local!selCountry,
  required: true
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown/custom picker (to utilize auto suggestions) with the option to enter new values?</title><link>https://community.appian.com/thread/104696?ContentTypeID=1</link><pubDate>Thu, 24 Nov 2022 13:40:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e24972ea-b955-41e0-bed2-ef67751ff604</guid><dc:creator>Shikha</dc:creator><description>&lt;p&gt;can you plx share some sample code for this?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown/custom picker (to utilize auto suggestions) with the option to enter new values?</title><link>https://community.appian.com/thread/104619?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 06:35:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0eb879e7-0db7-4a60-9f1b-d25ab202a903</guid><dc:creator>BE.Thomas </dc:creator><description>&lt;p&gt;Thank you, that helped. Basically what I did was&amp;nbsp;to enhance the pattern &lt;a href="https://docs.appian.com/suite/help/22.4/recipe-configure-an-array-picker.html"&gt;recipe-configure-an-array-picker.html&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;add the keyword
&lt;ul&gt;
&lt;li&gt;to the result list of the search function&lt;/li&gt;
&lt;li&gt;to the value list of the customer picker&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(I did not yet needed an new record - but that is really nice to know that this would be achievable as well)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown/custom picker (to utilize auto suggestions) with the option to enter new values?</title><link>https://community.appian.com/thread/104503?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 08:07:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb3a92e6-7141-4090-a925-5a51d89f5957</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;That requires some tricks. A custom picker field expects a datasubset returned from the suggest function. That datasubset has a field called &amp;quot;identifiers&amp;quot; which is of type ANY. This means that you can put your whole record in it, instead of just the ID.&lt;/p&gt;
&lt;p&gt;When your user now looks for a non-existing item, you just have to add the entered search string to the field &amp;quot;data&amp;quot; and a new record (empty primary key!) to the identifiers field.&lt;/p&gt;
&lt;p&gt;I use this to provide a field to enter keywords mixing existing and new ones.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>