{"id":21860,"date":"2019-06-21T19:26:12","date_gmt":"2019-06-21T13:56:12","guid":{"rendered":"https:\/\/techmasala.addastudents.com\/dev\/?p=21860"},"modified":"2020-06-02T08:49:13","modified_gmt":"2020-06-02T03:19:13","slug":"functions-in-powerapps-part1","status":"publish","type":"post","link":"https:\/\/techmasala.addastudents.com\/dev\/functions-in-powerapps-part1\/","title":{"rendered":"Functions in PowerApps: Part1"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Filter:<\/strong> Use Filter to find a set of records that match one or more criteria and to discard those that don&#8217;t. <br><strong>&#8211;<\/strong> Filter function return a table records as per the condition or criteria that is being applied.&nbsp; <br><strong>&#8211; <\/strong>If no records found then filter function returns empty table. <br><strong>&#8211; Syntax: <\/strong>Filter (<em>Table<\/em>,&nbsp;<em>Condition1 <\/em>[, <em>Condition2<\/em>, &#8230;]) <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> <strong>Search:<\/strong> Use Search to finds records in a table that contain a string in one of their columns. <br><strong>&#8211;<\/strong> Search function return a table records as per the search string that is being applied.&nbsp; <br><strong>&#8211; <\/strong>If no records found then Search function returns empty table. <br><strong>&#8211; Syntax: <\/strong>Search (<em>Table<\/em>,&nbsp;<em>SearchString<\/em>,&nbsp;<em>Column1<\/em>&nbsp;[,&nbsp;<em>Column2<\/em>, &#8230;]) <\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- horibnr -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:728px;height:90px\"\n     data-ad-client=\"ca-pub-5374634985378775\"\n     data-ad-slot=\"8785400987\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><br>  <strong>Lookup:<\/strong> LookUp returns only the first record found, after applying a formula to reduce the record to a single value. <br><strong>&#8211; <\/strong>If no records found then filter function returns a <em>blank<\/em>. <br><strong>&#8211; Syntax: <\/strong>LookUp (<em>Table<\/em>,&nbsp;<em>Formula<\/em>&nbsp;[, <em>ReductionFormula<\/em>]) <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">  Let\u2019s take an example to better understand Filter, Search and Lookup Consider a table &#8220;Employee&#8221;   <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> 1. Filter (Employee, &#8220;<strong>Employee ID<\/strong>&#8221; = &#8220;As0002&#8221;): Returns records where <strong>Employee ID<\/strong> equals to As0002. <br>Below table shows the return records  <\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- horibnr -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:728px;height:90px\"\n     data-ad-client=\"ca-pub-5374634985378775\"\n     data-ad-slot=\"8785400987\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><br>   2. Search (Employee, &#8220;&#8221;, &#8220;<strong>Employee ID<\/strong>&#8220;): Because the search term is empty, all records are returned. <br>Below table shows the return records   <br><\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- horibnr -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:728px;height:90px\"\n     data-ad-client=\"ca-pub-5374634985378775\"\n     data-ad-slot=\"8785400987\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\">\n\n3. Search (Employee, &#8220;An&#8221;, &#8220;<strong>Name<\/strong>&#8220;): Returns records where the string &#8220;An&#8221; appears in the <strong>Name<\/strong>, independent of uppercase or lowercase letters. <br>Below table shows the return records \n\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\n\n4. LookUp (Employee, &#8220;<strong>Name<\/strong>&#8221; = &#8220;Annu&#8221; ): Searches for a record with <br><strong>Name<\/strong> equal to &#8220;Annu&#8221;, of which there is one record. Since no reduction formula was supplied, the entire record is returned. <br><strong>Return records: <\/strong>{ <strong>Employee ID:<\/strong> An0001, <strong>Name<\/strong> : &#8220;Annu&#8221;, <strong>Phone Number:<\/strong><br>2345659089 } \n\n<\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- horibnr -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:728px;height:90px\"\n     data-ad-client=\"ca-pub-5374634985378775\"\n     data-ad-slot=\"8785400987\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\">\n\n5. LookUp (Employee, &#8220;<strong>Name<\/strong>&#8221; = &#8220;Annu&#8221;, &#8221; <strong>Employee ID<\/strong>&#8220;): Searches for a record with <strong>Name<\/strong> equal to &#8220;Annu&#8221;, of which there is one record. For the first record that&#8217;s found, returns the <strong>Employee ID<\/strong> of that record <br><strong>Return records: <\/strong>{ <strong>Employee ID:<\/strong> An0001} \n\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">6. LookUp (Employee, &#8220;<strong>Name<\/strong>&#8221; = &#8220;Divya&#8221;, &#8221; <strong>Employee ID<\/strong>&#8220;): Searches for a record with <strong>Name<\/strong> equal to &#8220;Divya&#8221;, of which there are none. Because none were found, <strong>Lookup <\/strong>returns&nbsp;<em>blank<\/em>. <br><strong>Return records: <\/strong><em>blank <\/em><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Filter: Use Filter to find a set of records that match one or more criteria and to discard those that don&#8217;t. &#8211; Filter function return a table records as per the condition or criteria that is being applied.&nbsp; &#8211; If no records found then filter function returns empty table. &#8211; Syntax: Filter (Table,&nbsp;Condition1 [, Condition2, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":21861,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-21860","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn-microsoft-powerapps"],"_links":{"self":[{"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/posts\/21860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/comments?post=21860"}],"version-history":[{"count":1,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/posts\/21860\/revisions"}],"predecessor-version":[{"id":31798,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/posts\/21860\/revisions\/31798"}],"wp:attachment":[{"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/media?parent=21860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/categories?post=21860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/tags?post=21860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}