{"id":330,"date":"2021-09-16T08:27:43","date_gmt":"2021-09-16T08:27:43","guid":{"rendered":"http:\/\/4us2use.at\/?p=330"},"modified":"2021-09-16T08:27:43","modified_gmt":"2021-09-16T08:27:43","slug":"make-power-apps-sharepoint-dropdown-lookup-field-searchable-for-contains","status":"publish","type":"post","link":"http:\/\/4us2use.at\/?p=330","title":{"rendered":"Make Power Apps SharePoint Dropdown (Lookup Field) searchable for &#8220;contains&#8221;"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Problem:<\/strong><\/p>\n\n\n\n<p>If you use SharePoint as data source in Power Apps and you have dropdown fields for lookup fields, they&#8217;re only searchable as &#8220;begins with&#8221; but not for &#8220;contains&#8221;. <br>This is caused by SharePoint, if you use the default Items value Choices(). <\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Solution:<\/strong><\/p>\n\n\n\n<p>You can get around this problem by building a collection. <br>The only trick, that also the update to SharePoint works, is that the collection may only consist of the columns &#8220;Id&#8221; and &#8220;Value&#8221;. You can achive this with the following formula:<\/p>\n\n\n\n<p> ClearCollect(colMyCollection ,<br>     ShowColumns(<br>         RenameColumns(ListWithLookupValues,&#8221;ID&#8221;,&#8221;Id&#8221;,&#8221;Title&#8221;,&#8221;Value&#8221;)<br>         ,&#8221;Id&#8221;,&#8221;Value&#8221;<br>         )<br> );<\/p>\n\n\n\n<p>Now use the collection in the dropdown Items property. <br>That&#8217;s it&#8230;<\/p>\n\n\n\n<span id=\"post-ratings-330\" class=\"post-ratings\" data-nonce=\"87f1fc6f32\"><img id=\"rating_330_1\" src=\"http:\/\/4us2use.at\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"1 Star\" title=\"1 Star\" onmouseover=\"current_rating(330, 1, '1 Star');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_330_2\" src=\"http:\/\/4us2use.at\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"2 Stars\" title=\"2 Stars\" onmouseover=\"current_rating(330, 2, '2 Stars');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_330_3\" src=\"http:\/\/4us2use.at\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"3 Stars\" title=\"3 Stars\" onmouseover=\"current_rating(330, 3, '3 Stars');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_330_4\" src=\"http:\/\/4us2use.at\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"4 Stars\" title=\"4 Stars\" onmouseover=\"current_rating(330, 4, '4 Stars');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_330_5\" src=\"http:\/\/4us2use.at\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_off.gif\" alt=\"5 Stars\" title=\"5 Stars\" onmouseover=\"current_rating(330, 5, '5 Stars');\" onmouseout=\"ratings_off(0, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/> (No Ratings Yet)<br \/><span class=\"post-ratings-text\" id=\"ratings_330_text\"><\/span><\/span><span id=\"post-ratings-330-loading\" class=\"post-ratings-loading\"><img src=\"http:\/\/4us2use.at\/wp-content\/plugins\/wp-postratings\/images\/loading.gif\" width=\"16\" height=\"16\" class=\"post-ratings-image\" \/>Loading...<\/span>\n","protected":false},"excerpt":{"rendered":"<p>Problem: If you use SharePoint as data source in Power Apps and you have dropdown fields for lookup fields, they&#8217;re only searchable as &#8220;begins with&#8221; but not for &#8220;contains&#8221;. This is caused by SharePoint, if you use the default Items value Choices(). Solution: You can get around this problem by building a collection. The only &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/4us2use.at\/?p=330\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Make Power Apps SharePoint Dropdown (Lookup Field) searchable for &#8220;contains&#8221;&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,6],"tags":[18,17,14,16,15],"_links":{"self":[{"href":"http:\/\/4us2use.at\/index.php?rest_route=\/wp\/v2\/posts\/330"}],"collection":[{"href":"http:\/\/4us2use.at\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4us2use.at\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4us2use.at\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4us2use.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=330"}],"version-history":[{"count":1,"href":"http:\/\/4us2use.at\/index.php?rest_route=\/wp\/v2\/posts\/330\/revisions"}],"predecessor-version":[{"id":331,"href":"http:\/\/4us2use.at\/index.php?rest_route=\/wp\/v2\/posts\/330\/revisions\/331"}],"wp:attachment":[{"href":"http:\/\/4us2use.at\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4us2use.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4us2use.at\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}