<?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>Hello,  I am trying to create a pickerFieldCustom.  I was able to make</title><link>https://community.appian.com/discussions/f/rules/2961/hello-i-am-trying-to-create-a-pickerfieldcustom-i-was-able-to-make</link><description>Hello, I am trying to create a pickerFieldCustom. I was able to make one that works when selecting a single result, but what is the best practice or implementation of selecting multiple results? Thanks.... OriginalPostID-114655 OriginalPostID-114655</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hello,&lt;br /&gt;&lt;br /&gt;I am trying to create a pickerFieldCustom.  I was able to make</title><link>https://community.appian.com/thread/10387?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2014 20:03:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b20696e8-3f50-4287-b107-aff756ee7bdc</guid><dc:creator>issamd</dc:creator><description>For anyone of concern I&amp;#39;ve figured out my issue. It had to do with my query rule not accepting multiples.  It works now, thank you.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello,&lt;br /&gt;&lt;br /&gt;I am trying to create a pickerFieldCustom.  I was able to make</title><link>https://community.appian.com/thread/10381?ContentTypeID=1</link><pubDate>Mon, 30 Jun 2014 21:18:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b353dadb-d9dc-4574-812b-2b0b5fc7d6ef</guid><dc:creator>issamd</dc:creator><description>Ignore all the previous code.  What I have now is pasted below.  It will select one item but then it returns an error related to selectedLabel and value not being the same length:&lt;br /&gt;&lt;br /&gt;= a!pickerFieldCustom(&lt;br /&gt;  label: ri!label,&lt;br /&gt;  instructions: ri!instructions,&lt;br /&gt;  required: ri!required,&lt;br /&gt;  requiredMessage: ri!requiredMessage,&lt;br /&gt;  readOnly: ri!readOnly,&lt;br /&gt;  disabled: ri!disabled,&lt;br /&gt;  maxSelections: if(&lt;br /&gt;    isnull(&lt;br /&gt;      ri!maxSelections&lt;br /&gt;    ),&lt;br /&gt;    1,&lt;br /&gt;    ri!maxSelections&lt;br /&gt;  ),&lt;br /&gt;  suggestFunction: rule!RULE_getEmployeeForPicker(&lt;br /&gt;    _,&lt;br /&gt;    if(&lt;br /&gt;      rule!APN_isBlank(&lt;br /&gt;        ri!numResultsReturned&lt;br /&gt;      ),&lt;br /&gt;      20,&lt;br /&gt;      ri!numResultsReturned&lt;br /&gt;    )&lt;br /&gt;  ),&lt;br /&gt;  selectedLabels: if(&lt;br /&gt;    &lt;br /&gt;      rule!APN_isBlank(&lt;br /&gt;        ri!value&lt;br /&gt;      ),&lt;br /&gt;    null,&lt;br /&gt;    apply(rule!RULE_multipleEmployeeLabelForPicker(identifier: _, labels: rule!Q_getEmployeeForPickerByID(&lt;br /&gt;          ri!value&lt;br /&gt;        ).Name_Email_Division, identifiers: rule!Q_getEmployeeForPickerByID(&lt;br /&gt;          ri!value&lt;br /&gt;        ).UserID), ri!value&lt;br /&gt;    )&lt;br /&gt;  ),&lt;br /&gt;     value: ri!value,&lt;br /&gt;    saveInto: {ri!value,&lt;br /&gt;      ri!saveValueInto&lt;br /&gt;    },&lt;br /&gt;  refreshAfter: &amp;quot;KEYPRESS&amp;quot;&lt;br /&gt;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello,&lt;br /&gt;&lt;br /&gt;I am trying to create a pickerFieldCustom.  I was able to make</title><link>https://community.appian.com/thread/10380?ContentTypeID=1</link><pubDate>Mon, 30 Jun 2014 21:07:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d8d908e5-6efe-4ecd-9948-f6b7b564f01a</guid><dc:creator>issamd</dc:creator><description>I created the rule and used this code.  Now when I test the picker it leaves no label.&lt;br /&gt;&lt;br /&gt; selectedLabels: if(&lt;br /&gt;    or(&lt;br /&gt;      rule!APN_isBlank(&lt;br /&gt;        ri!value&lt;br /&gt;      ),&lt;br /&gt;      count(&lt;br /&gt;        ri!value&lt;br /&gt;      ) = 0&lt;br /&gt;    ),&lt;br /&gt;    null,&lt;br /&gt;    apply(rule!RULE_multipleEmployeeLabelForPicker(identifier: _, labels: rule!Q_getEmployeeForPickerByID(&lt;br /&gt;          ri!value&lt;br /&gt;        ).Name_Email_Division, identifiers: rule!Q_getEmployeeForPickerByID(&lt;br /&gt;          ri!value&lt;br /&gt;        ).UserID), ri!value&lt;br /&gt;    )&lt;br /&gt;  ),&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello,&lt;br /&gt;&lt;br /&gt;I am trying to create a pickerFieldCustom.  I was able to make</title><link>https://community.appian.com/thread/10379?ContentTypeID=1</link><pubDate>Mon, 30 Jun 2014 20:54:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:845aa99b-2d9f-4873-a3bd-0cbb48fd0c82</guid><dc:creator>issamd</dc:creator><description>ri!value is what&amp;#39;s passed in to my expression.  Name_Email_Division is the label that contains the UserID.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello,&lt;br /&gt;&lt;br /&gt;I am trying to create a pickerFieldCustom.  I was able to make</title><link>https://community.appian.com/thread/10378?ContentTypeID=1</link><pubDate>Mon, 30 Jun 2014 20:53:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:050a2204-94e6-47ac-9286-468ed14d8b3b</guid><dc:creator>issamd</dc:creator><description>If I want to avoid sending it to a rule, how can I do that?  This is what I have:&lt;br /&gt;&lt;br /&gt;selectedLabels: if(&lt;br /&gt;    or(&lt;br /&gt;      rule!APN_isBlank(&lt;br /&gt;        ri!value&lt;br /&gt;      ),&lt;br /&gt;      count(&lt;br /&gt;        ri!value&lt;br /&gt;      ) = 0&lt;br /&gt;    ),&lt;br /&gt;    null,&lt;br /&gt;    apply(&lt;br /&gt;      index(&lt;br /&gt;        _,&lt;br /&gt;        rule!Q_getEmployeeForPickerByID(&lt;br /&gt;          ri!value&lt;br /&gt;        ).Name_Email_Division,&lt;br /&gt;        rule!Q_getEmployeeForPickerByID(&lt;br /&gt;          ri!value&lt;br /&gt;        ).UserID,&lt;br /&gt;        ri!value&lt;br /&gt;      )&lt;br /&gt;    ),&lt;br /&gt;     value: ri!value,&lt;br /&gt;  saveInto: {&lt;br /&gt;    ri!saveValueInto&lt;br /&gt;  }&lt;br /&gt;  )&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello,&lt;br /&gt;&lt;br /&gt;I am trying to create a pickerFieldCustom.  I was able to make</title><link>https://community.appian.com/thread/10377?ContentTypeID=1</link><pubDate>Mon, 30 Jun 2014 20:29:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb173a6c-97e9-4330-9799-29b27c56ac05</guid><dc:creator>evan.rust</dc:creator><description>In general: If you are following the SAIL recipe for custom pickers (&lt;a href="https://forum.appian.com/suite/wiki/75/SAIL_Recipes#Configure_an_Array_Picker)"&gt;forum.appian.com/.../SAIL_Recipes&lt;/a&gt;, notice that the apply() function is used over the rule!ucArrayPickerGetLabelForIdentifier rule in the selectedLabels parameter.  &lt;br /&gt;&lt;br /&gt;If you are having problems with your code, attach it to your post so others may assist you.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>