{"id":65,"date":"2020-06-23T08:34:03","date_gmt":"2020-06-23T07:34:03","guid":{"rendered":"http:\/\/m365-blog.de\/?p=65"},"modified":"2020-06-23T10:15:42","modified_gmt":"2020-06-23T09:15:42","slug":"regex-with-canvas-apps-in-powerapps","status":"publish","type":"post","link":"https:\/\/m365-blog.de\/?p=65","title":{"rendered":"Regex with Canvas Apps in  PowerApps"},"content":{"rendered":"\n<p>The current SharePoint Connectors don\u2019t support creating folders directly via PowerApps in a SharePoint Library. To solve that, I used a custom list and a Flow in the background to create folders.<\/p>\n\n\n\n<p>We had the problem that users start typing in not supported folder names with invalid characters. Checking this in flow is an option but in my opinion a bit too late, because we want that the users should see what will work and what not.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"328\" height=\"239\" src=\"https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/invalidchars.jpg\" alt=\"\" class=\"wp-image-66\" srcset=\"https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/invalidchars.jpg 328w, https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/invalidchars-300x219.jpg 300w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/figure>\n\n\n\n<p>I start searching for something like a Regex in PowerApps for Input Textboxes and came across this solution:<\/p>\n\n\n\n<p class=\"has-background has-very-light-gray-background-color\"><strong>IsMatch(TextInput1.Text,&#8221;\\&#8221;&#8221;|\\*|\\:|\\&lt;|\\&gt;|\\?|\\\/|\\\\|\\||\\.&#8221;,Contains)<\/strong><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-ismatch#regular-expressions\" target=\"_blank\">Source <\/a><\/p>\n\n\n\n<p>We just have a couple of special characters in SharePoint Online: <\/p>\n\n\n\n<p class=\"has-text-color has-background has-very-dark-gray-color has-very-light-gray-background-color\"><strong>&#8220;*:&lt;>?\/\\|.<\/strong><\/p>\n\n\n\n<p>Now you can use this wherever you want. In our case we put it in the <strong>BorderColor<\/strong> Property of the TextInput1 Filed and color it red when there are invalid characters.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1328\" height=\"95\" src=\"https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr.jpg\" alt=\"\" class=\"wp-image-67\" srcset=\"https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr.jpg 1328w, https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-300x21.jpg 300w, https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-1024x73.jpg 1024w, https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-768x55.jpg 768w\" sizes=\"auto, (max-width: 1328px) 100vw, 1328px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The current SharePoint Connectors don\u2019t support creating folders directly via PowerApps in a SharePoint Library. To solve that, I used a custom list and a Flow in the background to create folders. We had the problem that users start typing in not supported folder names with invalid characters. Checking this in flow is an option but in my opinion a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":67,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[3,2],"tags":[21,20,19],"class_list":["post-65","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-power-apps","category-power-plattform","tag-bordercolor","tag-canvas","tag-regex"],"uagb_featured_image_src":{"full":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr.jpg",1328,95,false],"thumbnail":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-150x95.jpg",150,95,true],"medium":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-300x21.jpg",300,21,true],"medium_large":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-768x55.jpg",640,46,true],"large":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-1024x73.jpg",640,46,true],"elegant_blocks_team_1":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-500x95.jpg",500,95,true],"elegant_blocks_blog_1":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-693x95.jpg",693,95,true],"elegant_blocks_slider_1":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr.jpg",1328,95,false],"1536x1536":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr.jpg",1328,95,false],"2048x2048":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr.jpg",1328,95,false],"bizberg_medium":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-300x95.jpg",300,95,true],"bizberg_gallery":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-500x95.jpg",500,95,true],"bizberg_blog_list":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-368x95.jpg",368,95,true],"bizberg_detail_image":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-825x95.jpg",825,95,true],"bizberg_detail_image_no_sidebar":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-920x95.jpg",920,95,true],"bizberg_portfolio_homepage":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-600x95.jpg",600,95,true],"bizberg_blog_list_no_sidebar_1":["https:\/\/m365-blog.de\/wp-content\/uploads\/2020\/06\/borderclr-220x95.jpg",220,95,true]},"uagb_author_info":{"display_name":"m365admin","author_link":"https:\/\/m365-blog.de\/?author=1"},"uagb_comment_info":2,"uagb_excerpt":"The current SharePoint Connectors don\u2019t support creating folders directly via PowerApps in a SharePoint Library. To solve that, I used a custom list and a Flow in the background to create folders. We had the problem that users start typing in not supported folder names with invalid characters. Checking this in flow is an option&hellip;","_links":{"self":[{"href":"https:\/\/m365-blog.de\/index.php?rest_route=\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m365-blog.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/m365-blog.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/m365-blog.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m365-blog.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":3,"href":"https:\/\/m365-blog.de\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/m365-blog.de\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions\/70"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/m365-blog.de\/index.php?rest_route=\/wp\/v2\/media\/67"}],"wp:attachment":[{"href":"https:\/\/m365-blog.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/m365-blog.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/m365-blog.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}