<?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>userSearch Function and LDAP</title><link>https://community.appian.com/discussions/f/plug-ins/8897/usersearch-function-and-ldap</link><description>#LDAP #userSearchI&amp;#39;m importing the manager field from LDAP into a customField1. The value that comes from Active Directory is &amp;quot;CN=Jetson\\, George,OU=Users,OU=Metropolis,DC=SpacelySprockets,DC=local &amp;quot;i can isolate the first name and last name by usign</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: userSearch Function and LDAP</title><link>https://community.appian.com/thread/39589?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2016 20:20:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6e17b6ae-ce65-452a-af53-8b37f02d6d7b</guid><dc:creator>claudiob</dc:creator><description>This was the final resolution in case anyone is interested...  split( clean(substitute( substitute( extract( user(ri!user,&amp;quot;customField1&amp;quot;), &amp;quot;CN=&amp;quot;, &amp;quot;,OU=&amp;quot; ), &amp;quot;\\,&amp;quot;, &amp;quot;&amp;quot;),&amp;quot;&amp;#39;&amp;quot;,&amp;quot;&amp;quot;)), &amp;quot; &amp;quot;)    ...the second substitute removes apostrophe&amp;#39;s like O&amp;#39;dell. The clean() removes any extra white space. I&amp;#39;m sure there will be other special cases to remove but this works for now. Thanks for the help.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: userSearch Function and LDAP</title><link>https://community.appian.com/thread/39571?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2016 09:24:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:59e20141-a8d7-4002-90ce-d0ff8a7d0d91</guid><dc:creator>sikhivahans</dc:creator><description>@claudiob No worries, &amp;quot;, &amp;quot; worked for me with the string you have mentioned in the post. Good to hear that it&amp;#39;s resolved.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: userSearch Function and LDAP</title><link>https://community.appian.com/thread/39557?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2016 20:29:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c4852259-0e37-44b0-8a88-bf85eaf11275</guid><dc:creator>claudiob</dc:creator><description>thanks sikhivahan, interesting catch. I don&amp;#39;t think I&amp;#39;ve experienced the same issue in other languages. Splitting on &amp;quot;, &amp;quot; did not work, but substituting the &amp;quot; &amp;quot; with &amp;quot;&amp;quot; actually did.  Thanks for the redirection.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: userSearch Function and LDAP</title><link>https://community.appian.com/thread/39529?ContentTypeID=1</link><pubDate>Sun, 20 Nov 2016 10:35:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:322149c5-b60c-423c-8c52-08d891fa32c3</guid><dc:creator>sikhivahans</dc:creator><description>If the above is correct, then you may slightly change the way(refer the code below) you split provided if it&amp;#39;s a standard pattern across all the values:&lt;br /&gt;&lt;br /&gt;load(&lt;br /&gt;  local!name: split(&lt;br /&gt;    substitute(&lt;br /&gt;      extract(&lt;br /&gt;        &amp;quot;CN=Jetson\\, George,OU=Users,OU=Metropolis,DC=SpacelySprockets,DC=local &amp;quot;,&lt;br /&gt;        &amp;quot;CN=&amp;quot;,&lt;br /&gt;        &amp;quot;,OU=&amp;quot;&lt;br /&gt;      ),&lt;br /&gt;      &amp;quot;\\&amp;quot;,&lt;br /&gt;      &amp;quot;&amp;quot;&lt;br /&gt;    ),&lt;br /&gt;    &amp;quot;, &amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*Use the comma with space as a separator(rather than comma) in the split(), as there is a space after the comma, that is prior to firstName*/&lt;br /&gt;  ),&lt;br /&gt;  usersearch(&lt;br /&gt;    {&lt;br /&gt;      &amp;quot;lastName&amp;quot;,&lt;br /&gt;      &amp;quot;firstName&amp;quot;&lt;br /&gt;    },&lt;br /&gt;    {&lt;br /&gt;      1,&lt;br /&gt;      1&lt;br /&gt;    },&lt;br /&gt;    local!name&lt;br /&gt;  )&lt;br /&gt;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: userSearch Function and LDAP</title><link>https://community.appian.com/thread/39528?ContentTypeID=1</link><pubDate>Sun, 20 Nov 2016 10:15:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ba6ba2af-f830-4b1e-8aa8-e4758ba470d9</guid><dc:creator>sikhivahans</dc:creator><description>@claudiob As far as my observation is considered, there is an additional space being appended to firstName in the LDAP search string which might be the root cause of issue. Please find attached the picture and I believe it might give you leads. Also if you can debug by using the  wherecontains() on the output of split() and the actual array of lastName, firstName (i.e., {"Jetson","George"}) you can see that firstName won't appear in search results.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: userSearch Function and LDAP</title><link>https://community.appian.com/thread/39527?ContentTypeID=1</link><pubDate>Sun, 20 Nov 2016 06:01:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e92b1e76-1eac-4047-be16-e8ad0843b520</guid><dc:creator>claudiob</dc:creator><description>...d(local!name:split( substitute( extract(user(ri!user,&amp;quot;customField1&amp;quot;),&amp;quot;CN=&amp;quot;,&amp;quot;,OU=&amp;quot;),&amp;quot;\\&amp;quot;,&amp;quot;&amp;quot;),&amp;quot;,&amp;quot;),usersearch({&amp;quot;lastName&amp;quot;,&amp;quot;firstName&amp;quot;},{1,1}, local!name))substituting local!name with the split code. attempting conversions of each individual element of the array and putting into a string. etc.  Does anyone know the trick to programmatically use userSearch to get a user from the system?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>