<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hadi Mahmood on Medium]]></title>
        <description><![CDATA[Stories by Hadi Mahmood on Medium]]></description>
        <link>https://medium.com/@hadimahmood777?source=rss-ac9859ec82e2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tpCgvfFIp3MIE3su</url>
            <title>Stories by Hadi Mahmood on Medium</title>
            <link>https://medium.com/@hadimahmood777?source=rss-ac9859ec82e2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:50:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hadimahmood777/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Fixed a PowerApps Flow Timeout Issue Using a Timer]]></title>
            <link>https://medium.com/@hadimahmood777/how-i-fixed-a-powerapps-flow-timeout-issue-using-a-timer-a4cc5748facb?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4cc5748facb</guid>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[powerapps]]></category>
            <category><![CDATA[microsoft-office-365]]></category>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[office-365]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Mon, 16 Mar 2026 19:04:44 GMT</pubDate>
            <atom:updated>2026-03-16T19:04:44.276Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wEWHQIytVk4cI5Q7o89zZQ.png" /></figure><h3>Introduction</h3><p>When integrating PowerApps with Power Automate, sometimes a flow takes too long to respond. When this happens, PowerApps may return an error like:</p><p><strong>ActionResponseTimedOut — client application timed out waiting for a response from service.</strong></p><p>In this post, we walk through how the timeout occurs and how to fix it using a Timer in PowerApps.<br> <br> The time of the flow is about 2 minutes (120 seconds).<br> After this the flow will timeout from the PowerApps.</p><h3>Step 1 — Create the Flow</h3><p>Create an Instant Cloud Flow in Power Automate using the trigger ‘When Power Apps calls a flow (V2)’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*i55Y2Dcx_KKDNbLy58bL0A.png" /></figure><h3>Step 2 — Add a Long Running Operation</h3><p>Add a Delay action to simulate a long-running process (for example: 3 minutes).<br> <br> This represents tasks such as API calls, file processing, or heavy data operations.<br> Flow will timeout after only 120 seconds . it will not wait for the process to complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*H3eMFq3G76RQ6WNXfT6O7w.png" /></figure><h3>Step 3 — Create the PowerApp</h3><p>Create a PowerApps canvas app and add a button that will trigger the flow.<br> Then link the flow to the “Run Flow” button. <br> Run the flow by RunTimeOut.Run().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*Bcyqqfkp-MCPK3lcwGTjWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*GGPYGM8ZRzLITy4Gd9iong.png" /></figure><h3>Step 4 — Run the App (Timeout Error)</h3><p>When the button is clicked, PowerApps waits for the flow response. If the flow takes more than 120 seconds PowerApps throws a timeout error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*QqRlYPfb_XZKkUGE_3xOOQ.png" /></figure><h3>Step 5 — Create a SharePoint List to Track Status</h3><p>To solve this , we will store the response of the powerapp in a SharePoint list and once the response has been added to the list only then will the rest of the processes proceed further. <br> When the RunPatch has a value of “True” only then will the rest of the processes proceed.</p><p>This <strong>RunPatch</strong> will be used as a status flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*Gs52SRK2VTT-pI5avFESDQ.png" /></figure><h3>Step 6 — Modify the Flow to Update SharePoint</h3><p>At the end of the flow, update the SharePoint list item:</p><p>This notifies PowerApps when the flow finishes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*9TDIOjxIVgR8iJe4v7G4HQ.png" /></figure><h3>Step 7 — Add a Timer in PowerApps</h3><p>Insert a Timer control in PowerApps with the following configurations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*NJEFg5zEfx6zx2mmL0EdRQ.png" /></figure><p><strong>Duration = 10000</strong><br> This sets the timer interval to <strong>10 seconds (10000 milliseconds)</strong>. The timer will trigger every 10 seconds to check whether the flow has completed.</p><p><strong>Repeat = true</strong><br> This ensures that the timer keeps running continuously. Without this, the timer would run only once and stop automatically.</p><p><strong>Start = startTimer</strong><br> The timer will start only when the variable <strong>startTimer</strong> is set to <strong>true</strong>. Typically, this variable is set to true when the user clicks a button that triggers the flow.This is set to true on the button click.<strong><br> <br> OnTimerEnd =</strong></p><p><strong>Set(</strong></p><p><strong>varStatus,</strong></p><p><strong>LookUp(SampleList, ID = 3, RunPatch)</strong></p><p><strong>);</strong></p><p><strong>If(</strong></p><p><strong>varStatus = true,</strong></p><p><strong>Patch(</strong></p><p><strong>SampleList,</strong></p><p><strong>LookUp(SampleList, ID = 3),</strong></p><p><strong>{Title:”John Smith”}</strong></p><p><strong>);</strong></p><p><strong>Set(startTimer,false)</strong></p><p><strong>)<br> <br> </strong><br> The <strong>OnTimerEnd</strong> property runs each time the timer finishes a cycle. <br> It checks the SharePoint list <strong>SampleList</strong> and retrieves the value of <strong>RunPatch</strong> for the item with <strong>ID = 3</strong>, storing it in <strong>varStatus</strong>. <br> If <strong>varStatus = True</strong>, it means the flow has finished, so PowerApps performs the next step (updating the SharePoint item) and then stops the timer by setting <strong>startTimer = false</strong>.<br><strong> </strong><br> <strong>Step8-Configure the Button to Trigger the Flow</strong><br>Set the properties in the button.</p><p><strong>DisplayMode</strong><br> -If(startTimer,DisplayMode.Disabled,DisplayMode.Edit)</p><p>This prevents the flow from being run twice , and waits for the current flow to be completed.It disables the button until the flow is completed.<br> <br> <strong>Button OnSelect</strong><br> -Set(startTimer, true);<br> -RunTimeOutFlow.Run();<br> This starts the timer and the flow.</p><h3>Step 9 — Run the App Again</h3><p>Click the button “<strong>Run Flow</strong>” again. <br> The flow will execute, will process for 3 minutes and then update the value in the SharePoint list.<br> The PowerApps will continue waiting for the updated value in the SharePoint list , and once its updated (RunPatch=”True”) then it will set value of Title (Title=”John Smith”) .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*9ILZXS7xY5sPa0U92r_bjg.png" /></figure><h3>Conclusion</h3><p>PowerApps can call complex flows from a button click but more then than not , these flows timeout. We can prevent this by combining Power Automate, SharePoint status tracking, and a Timer in PowerApps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4cc5748facb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Power Automate Workflows with Parent and Child Flows]]></title>
            <link>https://medium.com/@hadimahmood777/simplifying-power-automate-workflows-with-parent-and-child-flows-5a0a6feed07a?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a0a6feed07a</guid>
            <category><![CDATA[microsoft-365]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[microsoft-power-platform]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[microsoft-power-automate]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Sat, 07 Mar 2026 08:17:40 GMT</pubDate>
            <atom:updated>2026-03-07T08:17:40.966Z</atom:updated>
            <content:encoded><![CDATA[<p>When building automations in <strong>Power Automate</strong>, flows can become messy surprisingly fast.</p><p>You start with something simple — maybe sending an email or updating a record. Then more requirements come in. A few conditions here, another action there… and suddenly your flow is <strong>huge and difficult to maintain</strong>.</p><p>I ran into this exact situation recently. Several flows in my project needed to <strong>send emails</strong>, and I noticed I was repeating the same logic everywhere.</p><p>Instead of duplicating the same actions in multiple flows, I decided to create a <strong>Child Flow</strong> that handles the email logic once, and then let other flows call it.</p><p>The result was <strong>cleaner, reusable automation</strong>.</p><p>In this article, I’ll walk through the exact steps I followed.</p><p><strong>Step 1 — Create a Solution</strong></p><p>One important thing to know is that <strong>Child Flows only work inside Solutions</strong>.</p><p>If your flows are outside a solution, Power Automate will not allow them to be used as child flows.</p><p>So the first step is to create a solution.</p><p>Go to <strong>Power Apps → Solutions</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*_DLp2PEbqt3xNoWOL63sWg.png" /></figure><p>Click <strong>New Solution</strong>.</p><p>Fill in the basic information like:</p><ul><li>Display Name</li><li>Name</li><li>Publisher</li><li>Version</li></ul><p>Then click <strong>Create</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogDUEUqPbgqsYH6gxZkUMA.png" /></figure><p>Once the solution is created, we can start adding our flows inside it.</p><p><strong>Step 2 — Create the Child Flow</strong></p><p>Inside the solution, create a new flow.</p><p>Click:</p><p><strong>New → Automation → Cloud Flow → Instant</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*vBJ-KJSXeAq1OIP4GUo_-Q.png" /></figure><p>Give the flow a name. In this example I called it:</p><p><strong>ChildFlow</strong></p><p>Choose the trigger:</p><p><strong>Manually trigger a flow</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*NFt0Xxv-QlG-3tTVcCgghQ.png" /></figure><p>This trigger allows the flow to receive inputs from another flow.</p><p><strong>Step 3 — Add Inputs to the Child Flow</strong></p><p>Now we define the inputs that the parent flow will pass to the child flow.</p><p>In my case, the child flow is responsible for sending an email, so I added three inputs:</p><ul><li><strong>email_address</strong></li><li><strong>email_subject</strong></li><li><strong>email_body</strong></li></ul><p>Then I added the <strong>Send an email (V2)</strong> action and mapped these inputs to the corresponding fields.</p><p>Finally, I added <strong>Respond to a Power App or flow</strong> to return a message back to the parent flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*OdW-l4fPrk-sXadkPWSbpA.png" /></figure><p>At this point, the child flow is complete.</p><p><strong>Step 4 — Create the Parent Flow</strong></p><p>Now we create the flow that will call our child flow.</p><p>Inside the same solution, create another flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*78vUBVO-OWlMwGDzxcMExA.png" /></figure><p>Add the action:</p><p><strong>Run a Child Flow</strong></p><p>Select the child flow we created earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bzcX6eU-e3b8fWawcoc1Ig.png" /></figure><p>Power Automate automatically shows the inputs we defined earlier.</p><p>Now we simply provide values such as:</p><ul><li>Email Address</li><li>Email Subject</li><li>Email Body</li></ul><p>The parent flow will pass these values to the child flow during execution.</p><p>Before running the child flow , please ensure that the <strong>Run-only user</strong> is selected to a single account instead of <strong>“Provided by run-only user”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*w-BOn_EIujdZALAk_Sn4xw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*wYk8f9PXSEPj-4OVT4Zk8A.png" /></figure><p><strong>Step 5 — Test the Flow</strong></p><p>Now it’s time to run the flow and see everything in action.</p><p>Click <strong>Test</strong> and run the parent flow <strong>manually</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q2_jM-4qnAEW-7cQXa2LKQ.png" /></figure><p>Once the flow runs, you can see the execution steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GfL5_toQM1kmGWjFilI0dQ.png" /></figure><p>You should see something like this:</p><ol><li>Parent flow starts</li><li>Parent flow runs the child flow</li><li>Child flow sends the email</li></ol><p>Everything should complete successfully.</p><p><strong>Step 6 — Verify the Child Flow Run</strong></p><p>You can also check the <strong>Child Flow run history</strong> to confirm it executed correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9zzHR4rc2Fy3Rb2gy2twg.png" /></figure><p>This shows that the child flow was successfully triggered by the parent flow.</p><p><strong>Final Result</strong></p><p>If everything worked correctly, the email should now appear in the recipient’s inbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sMC0vxW5foBQBb3bkKLLSg.png" /></figure><p>The email contains the subject and body passed from the parent flow, proving that the entire <strong>Parent → Child Flow automation</strong> worked successfully.<br>We should also get the confirmation mail in the parent flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*Sr90sV3Li6Aav_raxhjWvA.png" /></figure><p><strong>Why This Approach Is So Useful</strong></p><p>After using this approach, a few benefits became obvious.</p><p>First, it removes duplication. Instead of rebuilding the same logic everywhere, the email logic exists in <strong>one place</strong>.</p><p>Second, it makes flows <strong>much easier to maintain</strong>. If something changes, I only update the child flow.</p><p>And finally, it keeps automation projects <strong>clean and scalable</strong>, which becomes very important as projects grow.</p><p><strong>Final Thoughts</strong></p><p>Using <strong>Parent and Child Flows in Power Automate</strong> is a simple technique, but it can significantly improve the way you structure your automations.Instead of building large monolithic flows, you create <strong>small reusable components</strong> that work together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a0a6feed07a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Track a Power Apps Performance with Power Apps Monitor]]></title>
            <link>https://medium.com/@hadimahmood777/track-a-power-apps-performance-with-power-apps-monitor-7ef8c2bc53c6?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ef8c2bc53c6</guid>
            <category><![CDATA[microsoft-365]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[m365]]></category>
            <category><![CDATA[microsoft-office]]></category>
            <category><![CDATA[microsoft-power-platform]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Thu, 31 Oct 2024 17:30:38 GMT</pubDate>
            <atom:updated>2024-10-31T17:30:38.026Z</atom:updated>
            <content:encoded><![CDATA[<p>Power Apps Monitor gives us a behind-the-scenes look at how our app is running. It tracks everything from user actions to data operations in real-time. Whether we’re looking to debug issues, improve app performance, or simply understand what’s happening in our app, the Monitor has us covered.</p><p>In this blog, we will go over its features, and use it to troubleshoot our Power App.</p><h3>1. Accessing Power Apps Monitor</h3><ul><li>Navigate to<a href="http://make.powerapps.com/"> make.powerapps.com.</a></li><li>Go to <strong>Apps</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/0*qQe4A7yR0JnK1zRb" /></figure><ul><li>Either open an existing app or create a new app. For this blog we will be working with an existing app.</li></ul><p>We have created a simple “<strong>Talent Tracker</strong>” app that allows its users to fill a simple form about their expertise in a skill. The user can then also perform CRUD operations on that list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/0*OlNTUi4wJ16BI3_7" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fSXwky50vcwIjIV4" /></figure><ul><li>Select <strong>Advanced tools</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/0*iYN3ytkJpy-RE1__" /></figure><ul><li>Click on<strong> Open monitor</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/0*3v4P3vP3sRCcnzol" /></figure><ul><li>We will be redirected to a new tab.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m1DqfHwVSfEkE1Yk" /></figure><h3>2. Overview of the Monitor’s UI</h3><p>Each time we perform any action in our app, it is reflected on the monitor in real time. Let’s run our app to see how it works.</p><p>We added a new row to our list, this is what the Monitor displayed in response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-vcexSJRdVUwrXvg" /></figure><p>For each click, it shows us what operations have been performed and the response for each step. This is important when we want to debug our app.</p><p>For a more detailed view,</p><ul><li>Click on <strong>Options </strong>&gt;<strong> Source filter</strong> &gt; <strong>Detailed</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*HsJ3a0Lg5EmfqYNm" /></figure><p>By turning on the detailed source filter, we are given more information regarding the step we performed.</p><p>For comparison,</p><p>We deleted a row and in the <strong>Default </strong>view. As a result, the monitor displayed only 5 rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9WpsCRgbL_N5RpN-" /></figure><p>For the same action, when we performed it with the <strong>Detailed </strong>view the monitor displayed 26 rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PiyPbS9I3dP6G7sp" /></figure><p>It can become difficult to detect errors when we have to work with such a large number of rows.</p><p>The <strong>Filter </strong>option allows us to search for what we are looking for.</p><ul><li>Click on <strong>Filter</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*8-AkrevIurvfNeK9" /></figure><ul><li>Write the query. We searched for “<strong>200</strong>” and as a result it showed us all the rows with the status code 200.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*ojo0R3s4t24t-5lV" /></figure><h3>3. Analyzing Data Operations</h3><p>Monitor allows us to track where our data is being stored and what actions have been performed on it. If an error occurs it also tells us the exact step where the error has occurred.</p><p>To view more details about any particular instance,</p><ul><li>Select the row.</li><li>Click on the <strong>Properties </strong>tab on the right.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/0*FMRQrdcCM8Vhjua7" /></figure><ul><li>A new window will open.</li><li>The <strong>Details </strong>window gives us all the information about what data is being used.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*rPlv8rlxzAV3gMjN" /></figure><ul><li>Click on the arrow next to <strong>data</strong>, to view complete details about the data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/0*HLvO-PZVu7T5n1E4" /></figure><ul><li>The <strong>Formula </strong>window shows us the formula (if any) that has been applied to our data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*8Lw4qA41ph5CzLz5" /></figure><h3>4. Sharing Monitor Logs</h3><p>We can also share our Monitor logs with other people.</p><ul><li>Click on <strong>Download</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/0*dNxpzO1nuKOsBX3n" /></figure><ul><li>We will be prompted to <strong>Save </strong>a .<strong>JSON </strong>file.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*h0i11UJscd_-OS4g" /></figure><p>We can also invite our teammates to join us in the same Monitor session.</p><ul><li>Click on <strong>Invite</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/0*-ZLsZjW0lE4nS8Sp" /></figure><ul><li>Type and select any teammates name to add them.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*2GP4-fWQK_iv-ffc" /></figure><h3>Conclusion</h3><p>In this blog, we explored how Power Apps Monitor provides a detailed, real-time look into the inner workings of an app. We walked through setting up, navigating and using filters in Power Apps Monitor. Power Apps Monitor also allows us to download our logs.</p><h3>That’s IT Folks!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ef8c2bc53c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Personalized Amazon Shopping Assistant Using Copilot]]></title>
            <link>https://medium.com/@hadimahmood777/creating-a-personalized-amazon-shopping-assistant-using-copilot-a28d2adf6900?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a28d2adf6900</guid>
            <category><![CDATA[microsoft-office]]></category>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[microsoft-copilot]]></category>
            <category><![CDATA[copilot-studio]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Sat, 26 Oct 2024 10:45:55 GMT</pubDate>
            <atom:updated>2024-10-27T17:40:52.818Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog, we will show you how we can turn a standard Copilot into a personalized assistant by adding our own topics and actions to it.</p><p>We will be building a Copilot that is designed to help its users explore different features on<a href="http://www.amazon.com/"> Amazon’s</a> e-commerce platform.</p><h3>1. Copilot Studio Setup</h3><ul><li>Navigate to<a href="https://copilotstudio.microsoft.com/"> copilotstudio.microsoft.com.</a></li><li>Click on <strong>Create</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/0*_fB26hI4FdvyuJgD" /></figure><ul><li>Select <strong>New Copilot</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*DsSVQqWW21msSslI" /></figure><ul><li>Give the Copilot a name. We named ours “<strong>AmazonAssist</strong>”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*zmwKDpYUYSHUFc6q" /></figure><ul><li>Scroll down to the <strong>Knowledge </strong>section.</li><li>Click on <strong>Add knowledge</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/0*IlYiSfLf7GFHx-3i" /></figure><ul><li>Since we are taking all of our information from Amazon’s site, we will select <strong>Public websites</strong>. If we want, we can even select personal SharePoint sites as our knowledge source.</li><li>For better results it is recommended that we use sites with a big data set.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*PrXacL3fv4kac2P6" /></figure><ul><li>Paste the link to the site and click on <strong>Add</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*w7gd2ndGL0kRNKvC" /></figure><ul><li>Once we have added all of our sites, click on <strong>Add</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*tgBBepRCC7ODEyhk" /></figure><ul><li>After adding the knowledge source, click on <strong>Create </strong>to create the Copilot.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/0*OdArPH3ogGIITbud" /></figure><ul><li>Once the Copilot has been successfully created, we will be redirected to this page:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/0*JbUoCHoQTuZm-RCI" /></figure><h3>2. Customizing Topics in Copilot</h3><p>Topics determine how the Copilot responds to our prompts. We will be creating two custom topics that will deal with different user inputs. We will also show how an existing topic can be edited.</p><ul><li>Click on <strong>Topics</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*Bq1AdqaqQmcEpNKT" /></figure><ul><li>Click on <strong>Add a topic</strong>.</li><li>Select <strong>Create from a description with Copilot</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/0*msdG-uYHKbNNj76n" /></figure><ul><li>Give the topic a name. We named our topic “<strong>Deals and Discounts</strong>”.</li><li>Add a description that describes how the Copilot should respond to a prompt. We added the following description:</li></ul><p>“<strong>Redirect the user to this site when they ask about deals and discounts on products: <em>https://www.amazon.com/deals?discounts</em></strong>”</p><ul><li>Click on <strong>Create</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*PifmvQpqm7y5dBc5" /></figure><p>Once our topic has been created, we will be redirected to its flow. This is what our flow looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/0*MojnWqvBTmPLOng8" /></figure><ul><li>The Trigger shows a list of phrases. If these phrases have been used in the user’s prompt, the Copilot will respond with the Message given under it.</li><li>We can Click on <strong>Edit </strong>and manually add more phrases to this list as well.</li><li>We can also change the text of this message if we wish.</li></ul><p>If we test our Copilot at this stage using one of the phrases listed in the topic, this is how it will respond:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*P18xIZd2V7BnXySL" /></figure><ul><li>Click on <strong>Save </strong>to save this topic.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/0*bdFQcp3N1wzovA3z" /></figure><p>Let’s create a new topic that deals with conditional input.</p><ul><li>Go back to <strong>Topics </strong>&gt; <strong>Add a Topic</strong> &gt; <strong>Create from a description with Copilot.</strong></li><li>Give the topic a name. We named this topic “<strong>Track or Refund</strong>”.</li><li>In the description, add a condition. We wrote:</li></ul><p>“<strong>If the user wants to track their order, redirect them to this site: </strong><a href="https://www.amazon.com/gp/css/order-history/ref=hp_ss_qs_v3_rt_yo"><strong><em>https://www.amazon.com/gp/css/order-history/ref=hp_ss_qs_v3_rt_yo</em></strong></a><strong> or if the user wants a refund, redirect them to this site: <em>https://www.amazon.com/gp/css/order-history/ref=hp_ss_qs_v3_rt_rr</em></strong>”.</p><ul><li>Click on <strong>Create</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*mc27CHqSLplLUEAs" /></figure><ul><li>This topic’s flow will have multiple stages.</li><li>First, the following phrases will trigger the flow:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/0*vEJ-KU2M53WpZ0lx" /></figure><ul><li>Then, Copilot will ask the user a question and store their response in a variable.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/0*Vy7AH_l7xXaZ78dR" /></figure><ul><li>Based on the value of the variable, the flow will execute the following conditions and generate a message.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tix2NedV8piknxBh" /></figure><ul><li>If we test our Copilot at this stage, this is how it will respond:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/0*HOdnMKGeBn3sLcSO" /></figure><ul><li>Click on <strong>Save </strong>to save this topic.</li></ul><p>Now, let’s change the welcome message of this bot by making changes to an existing topic.</p><ul><li>Go back to <strong>Topics</strong>.</li><li>This time select <strong>System</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/0*7ik4rLKIGxR1A_Hi" /></figure><ul><li>Click on <strong>Add a topic</strong> &gt; <strong>Create from a description with Copilot.</strong></li><li>Click on the <strong>Conversation Start</strong> topic.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*DbpES50yTkg_j8Ok" /></figure><p>This is a simple topic flow with only a trigger and a message. We edited the welcome message to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/0*y1VbPbGTZwWtd7DW" /></figure><ul><li>Now, this is how our Copilot will greet us at the start of each conversation:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/0*t8dRX1JPquHU1S4G" /></figure><ul><li>Click on <strong>Save </strong>to save this topic.</li></ul><h3>3. Adding Custom Actions in Copilot</h3><p>Actions in Copilot allow the user to do things that Copilot can’t do on its own, like calling an API or connecting to data sources.</p><ul><li>Go to <strong>Actions</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*T83BIZds-0A_K2RX" /></figure><ul><li>Click on <strong>Add an action</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*ez1abQOpsyU25TgI" /></figure><ul><li>Select a connector for the action. We selected <strong>Send an email notification (V3)</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*fRpzExoSy8DqaujL" /></figure><ul><li>Once we click on it, we will be asked to change its settings, scroll down to the <strong>Configure </strong>section.</li><li>We added the description for this action:</li></ul><p>“<strong>If a product is not available, send an email notification to the specified email when the product is available.</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*m5IHQVnoh9lRX0hu" /></figure><ul><li>Click on <strong>Next</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*E0iPZy_c4LlEzivR" /></figure><ul><li>In <strong>Step 2</strong>, based on our description, Copilot fills in the information itself.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*7bltumPc9ak8m-Lx" /></figure><ul><li>The inputs and outputs determine what the action will do based on the users input.</li><li>Click on <strong>Next</strong>.</li><li>Review the final details and click on <strong>Finish </strong>to add the action.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*xHvav3dtXq9gew8s" /></figure><h3>4. Enabling Generative AI in Copilot for Smarter Responses</h3><p>Generative AI settings allow the Copilot to determine the best conversation path for the user’s prompt on its own rather than sticking to a set of phrases. This allows the Copilot to handle all prompts even those that do not contain phrases which have been listed in the topic.</p><ul><li>Click on <strong>Settings</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/0*1tz9SiBTWb3xVMGS" /></figure><ul><li>Click on <strong>Generative AI</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/0*TH1ezrDZqSYNE1QL" /></figure><ul><li>Select the <strong>Generative (preview)</strong> option.</li><li>Content moderation determines how creative Copilot can get with the responses. We kept it at <strong>High</strong>.</li><li>Once we’re done, click on <strong>Save</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*xNys-snJ4fCcAKZK" /></figure><p>If we go back to our topics now, we will notice that it no longer has any phrases listed, rather it contains a generic statement that allows the Copilot to deal with all sorts of related prompts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/0*ZK3h0Afowj9VOCl_" /></figure><h3>Conclusion</h3><p>In this blog, we took a standard Copilot and customized it for Amazon’s e-commerce platform. First, we set up Copilot Studio, added the knowledge sources and then we created personalized topics to handle different user inputs. We also added custom actions and lastly. We then turned on the Generative AI settings to improve the Copilot’s conversation handling.</p><p>Let us know in the comments if you have any questions or how you plan to use your Copilot.</p><h3>That’s IT Folks!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a28d2adf6900" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Send Emails to SharePoint and Office 365 Groups Using Power Automate]]></title>
            <link>https://medium.com/@hadimahmood777/send-emails-to-sharepoint-and-office-365-groups-using-power-automate-1e8be6f2d8f3?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e8be6f2d8f3</guid>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[office-365]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[microsoft-365]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 18:42:59 GMT</pubDate>
            <atom:updated>2024-09-30T18:42:59.517Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will create a Power Automate flow that will send emails to members of SharePoint and Office 365 Group.</p><p>We want to send activity alerts to the members of a team working on a project. We will use SharePoint Group and Office 365 Groups to send emails.</p><h3><strong>1. Create the flow for SharePoint Group</strong></h3><p>Let’s start creating the flow.</p><ul><li>Go to<a href="https://make.powerautomate.com/"> https://make.powerautomate.com</a>.</li><li>Create an <strong>“Automated cloud flow”</strong>.</li><li>Write the <strong>“Flow name”</strong>.</li><li>Select the <strong>“When an item is created”</strong> trigger.</li><li>Click on the <strong>“Create”</strong> button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*RCSskJqCIMqopwz9" /></figure><p>You will be redirected to the following screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*C8AQlY7xHPWui2IS" /></figure><ul><li>Select the <strong>“Site Address”</strong> from the 1st dropdown and the <strong>“List Name”</strong> from the 2nd drop-down.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*VVWCNbrYoLjPUwBk" /></figure><ul><li>Click on the <strong>“New step”</strong> button.</li><li>Add the <strong>“Send an HTTP request to SharePoint”</strong> action.</li><li>Select the <strong>“Site Address”</strong> and select the <strong>“Get”</strong> option from the <strong>“Method”</strong> dropdown.</li><li>Paste the following expression in the <strong>“Uri”</strong> field.</li></ul><p><strong>Expression:</strong></p><p>_api/web/sitegroups(‘SharePoint_group_id’)/users</p><p><strong>Note:</strong> Open your SharePoint group , see the group number from the <strong>URL</strong>, and replace <strong>“</strong>SharePoint_group_id” with your group number.</p><p>To access SharePoint groups go to where <strong>‘domain’ </strong>is your SharePoint site domain.</p><p><a href="https://domain.sharepoint.com/_layouts/15/groups.aspx">https://domain.sharepoint.com/_layouts/15/groups.aspx</a></p><p>Our group <strong>“PowerCloudTechnologies” </strong>contains the following users. All of them will get the mail when the flow runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*VOmj1kxPUbldxK4t" /></figure><p>The<strong> “Send an HTTP request to SharePoint”</strong> action will be used to get details of the members of the SharePoint group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*V0NYRdlrYfzDzb69" /></figure><ul><li>Click on the <strong>“New step”</strong> button.</li><li>Add a <strong>“Select”</strong> action.</li><li>In the <strong>“From”</strong> field, go to “<strong>Expression</strong>” and paste the following expression.</li></ul><p><strong>Expression:</strong></p><p>outputs(‘Send_an_HTTP_request_to_SharePoint’)?[‘body’]?[‘d’]?[‘results’]</p><p>This expression will get the output of the previous HTTP action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*NWlzYwZkEHIksPOk" /></figure><ul><li>Click on the <strong>“T” </strong>icon to enter a custom expression in the <strong>“Map” </strong>field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*a-iuD0zH63vzG0LU" /></figure><ul><li>Add the following expression in the <strong>“Map”</strong> field as shown below.</li></ul><p><strong>Expression:</strong></p><p>item()?[‘Email’]</p><p>This expression will get the emails of all members of the group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*2iIEnkT1qkROq7mS" /></figure><ul><li>Click on the <strong>“New step”</strong> button.</li><li>Add a <strong>“Compose”</strong> action.</li><li>In the <strong>“Inputs”</strong> field, add the following expression.</li></ul><p><strong>Expression:</strong></p><p>join(body(‘Select’),’;’)</p><p>This expression will separate member’s emails with a semicolon (;) .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*udbtZhoJAwKzQvN7" /></figure><ul><li>Click on the <strong>“New step”</strong> button.</li><li>Add a <strong>“Send an email (V2)”</strong> action.</li><li>In the <strong>“To”</strong> field, add the <strong>“Outputs”</strong> of the <strong>“Compose”</strong> action.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*8OC0J5sim3Zohoai" /></figure><ul><li>Fill in the <strong>“Subject”</strong> and <strong>“Body”</strong> fields.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*XXb_W9PlkZcJrsvJ" /></figure><p>Now we will get the users of an Office 365 group.</p><h3><strong>2. Create the flow for O365 group</strong></h3><p>To access the groups, go to<a href="https://outlook.office.com/"> https://outlook.office.com/</a>, click on the <strong>“Person” </strong>icon from the left navigation bar and click on the group’s dropdown, choose Owner and you will see the groups of which you are the owner, as shown below. Our group is <strong>“PowerCloud-Technologies”,</strong> and it has eight members.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*mndsVppY_W2YaGxI" /></figure><ul><li>In flow, click on the <strong>“New step”</strong> button.</li><li>Add a <strong>“List group members”</strong> action.</li><li>Select the group name from the <strong>“Group Id”</strong> dropdown.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*Ox1Doc0pPETD0gl3" /></figure><ul><li>Click on the <strong>“New step”</strong> button.</li><li>Add a <strong>“Send an Email (V2)”</strong> action.</li><li>In the <strong>“To”</strong> field, select <strong>“Mail”</strong> from dynamic content.</li><li>Fill in the <strong>“Subject”</strong> and the <strong>“Body”</strong> fields.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*-l4zhIBaT0-EeFxb" /></figure><p>This <strong>“Send an email (V2)”</strong> action will automatically get wrapped in an <strong>“Apply to each”</strong> action because the group has multiple users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*H86sFJAnbg39w_8Q" /></figure><p>Your flow is ready to work.</p><h3><strong>3. Testing</strong></h3><p>Create a new item in your selected list. All the members of your selected SharePoint and Office 365 group will receive the alert emails.</p><p>Mail received by SharePoint group members.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*VNuuICu4FhRorS5t" /></figure><p>Mail received by Office 365 group members.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/0*w2g3zy9KhUScoj3b" /></figure><h3><strong>That’s IT Folks!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e8be6f2d8f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PowerApps Delegation]]></title>
            <link>https://medium.com/@hadimahmood777/powerapps-delegation-b0420c678635?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0420c678635</guid>
            <category><![CDATA[powerapps]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[m365]]></category>
            <category><![CDATA[microsoft-365]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 18:37:00 GMT</pubDate>
            <atom:updated>2024-09-30T18:37:00.872Z</atom:updated>
            <content:encoded><![CDATA[<p>PowerApps is a powerful platform for developing fast business applications, but sometimes excess manipulation and filtration of large datasets can cause PowerApps to lag, we can solve this issue by using the concept of Delegation.</p><h3><strong>1. What is a delegation?</strong></h3><p>In PowerApps, delegation is the process of assigning tasks to data sources instead of having PowerApps perform the tasks themselves. When working with large datasets, it is necessary to use Delegation, as it will limit the records that are sent between PowerApps and the data source. <br>As of now, only the mentioned data sources support Delegation.</p><ul><li>SharePoint</li><li>SQL Server</li><li>Dataverse</li><li>SalesForce</li></ul><h3><strong>2. Delegable functions</strong></h3><p>The following functions support delegations</p><ul><li>StartsWith</li><li>Filter</li><li>Lookup</li><li>Sort</li><li>Max/Min</li></ul><h3><strong>3. Non-delegable functions</strong></h3><ul><li>First, FirstN, Last, LastN</li><li>Choices</li><li>CountRows</li><li>Concat</li><li>Collect, ClearCollect</li><li>CountIf, RemoveIf, UpdateIf</li><li>GroupBy, Ungroup</li></ul><h3><strong>4. Delegates Examples</strong></h3><p>We have a SharePoint list with more than 5000 records. That SharePoint list is being shown in the PowerApps gallery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*ac54aasFjE4rH6FR" /></figure><h4><strong>4.1 Replacing “Search” With “StartsWith”</strong></h4><p><strong>Search based on Title </strong>— We applied the search function to search the products with the product name and saw the delegation warning.</p><p>We saw the delegation warning when we used the following code.</p><p>Search( <br>Products_Catalogue, //SharePoint List <br>SearchTextInput.Text, //Input field <br>“Title” //Column Name <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*RqvuiBm8QZa-styl" /></figure><p><strong>Workaround:</strong></p><p>The alternative to this is the <strong>“StartsWith”</strong> function which is delegable.</p><p>The delegation warning was gone when we used the following code.</p><p>Filter( <br>Products_Catalogue, //SharePoint list <br>StartsWith(Title,SearchTextInput.Text) <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*9NyRX86NL24plODX" /></figure><h4><strong>4.2 Using a collection for dropdown search</strong></h4><p><strong>Filter gallery based on Choice column</strong>– When we applied a <strong>“Status”</strong> column filter on the <strong>“Products Catalogue” </strong>list we saw the delegation warning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*ZAz8HfWHi0EnPhCB" /></figure><p><strong>Workaround:</strong></p><p>Store the <strong>“Status”</strong> choices in a collection. We created a collection <strong>“colStatus”</strong> on the <strong>“OnStart”</strong> property of our application.</p><p>ClearCollect(colStatus,Products_Catalogue.Status)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*CeV3U13QWzhTVgrF" /></figure><p>Pass the <strong>“colStatus”</strong> collection in the <strong>“items” </strong>property of the <strong>“Status”</strong> combo box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*fWRoAkakckIjUxsT" /></figure><p>Then we used the following <strong>“Filter”</strong> code, and the delegation warning was removed.</p><p>Filter( <br>Products_Catalogue, //SharePoint list <br>Status.Value = StatusCombo.Selected.Status.Value <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*HlL3FG1UdULnq1TQ" /></figure><h4><strong>4.3 Sorting Gallery</strong></h4><p><strong>Sort based on price and expiry data </strong>— We want to sort our gallery based on the <strong>“Price”</strong> and <strong>“Expiry date”</strong>.</p><p>There was a delegation warning when the following formula was used to sort the columns.</p><p>SortByColumns( <br>Filter( <br>Products_Catalogue, //SharePoint list <br>ExpiryDate &gt;= DatePicker1_2.SelectedDate &amp;&amp; ExpiryDate &lt;= DatePicker1_3.SelectedDate <br>), <br>varSortColumn, <br>Ascending <br>)</p><p>The variable <strong>“varSortColumn”</strong> stores the name of the column that is set when the <strong>“Sort”</strong> icons are selected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*wroKKX7X0jP84nod" /></figure><p><strong>Workaround:</strong></p><p>This delegation warning can be removed using a <strong>“Switch”</strong> function in the <strong>“Items”</strong> property of the gallery.</p><p>The delegation warning was removed when we used the following code.</p><p>Switch( <br>varSortColumn, <br>“ExpiryDate”, <br>SortByColumns( <br>Filter( <br>Products_Catalogue, <br>ExpiryDate &gt;= DatePicker1_2.SelectedDate &amp;&amp; ExpiryDate &lt;= DatePicker1_3.SelectedDate <br>), <br>“ExpiryDate”, <br>Ascending <br> ), <br> “Price”, <br> SortByColumns(</p><p>Filter(</p><p>Products_Catalogue,</p><p>ExpiryDate &gt;= DatePicker1_2.SelectedDate &amp;&amp; ExpiryDate &lt;= DatePicker1_3.SelectedDate</p><p>),</p><p>“Price”,</p><p>Ascending <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*XiqrKkHFlNd_v-EY" /></figure><h4><strong>4.4 Finding Max and Min Values</strong></h4><p><strong>Max- </strong>We want to show the maximum value from the <strong>“Price”</strong> column.</p><p>We added the following formula in the <strong>“Text”</strong> property of the <strong>“Label”</strong> and faced a delegation warning.</p><p>Max(Products_Catalogue,Price)</p><p><strong>Workaround:</strong></p><p>To resolve this delegation warning, we wrote the following formula on the <strong>“OnVisible”</strong> property of the screen.</p><p>This will sort the list in descending order of the price column and will store the <strong>“Price”</strong> of the first record in the <strong>“varMaxPrice”</strong> variable.</p><p>Set( <br> varMaxPrice,</p><p>First(</p><p>SortByColumns(</p><p>Products_Catalogue,</p><p>“Price”,</p><p>SortOrder.Descending</p><p>)</p><p>).Price <br>)</p><p>Then we used the <strong>“varMaxPrice”</strong> variable in the <strong>“Text”</strong> property of the <strong>“Label”</strong>.</p><p>The same above logic can be used for the <strong>“Min”</strong> function. The only difference will be sorting the <strong>“Products_Catalogue”</strong> list in the <strong>“Ascending” </strong>Order.</p><p><strong>Sum</strong>– This function is not delegable. We want to show the sum of the <strong>“Price”</strong> column.</p><p>We added the following formula in the <strong>“Text”</strong> property of the <strong>“Label”</strong> and faced a delegation warning.</p><p>Sum(Products_Catalogue,Price)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*lKtFYwJiBHiGcZQZ" /></figure><p><strong>Workaround:</strong></p><p>You can use the collection to avoid delegation issues with the <strong>“Sum” </strong>function.</p><p>The other alternative that you could explore is using Power Automate and Rest API to calculate the sum and return it to PowerApps.</p><h4><strong>4.5 Finding Total Rows</strong></h4><p><strong>CountRows</strong>– We want to count rows of the <strong>“Products_Catalogue”</strong> SharePoint list.</p><p>When we used the following formula, we got a delegation warning.</p><p>CountRows(Products_Catalogue)</p><p>Here we again used the collection because <strong>“CountRows”</strong> is not a delegable function.</p><p>We passed the collection in the <strong>“CountRows”</strong> function to remove this delegation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*uYwGDE7IXKeMDhSX" /></figure><h3><strong>That’s IT Folks!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0420c678635" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Passing Parameters to Power Automate from PowerApps]]></title>
            <link>https://medium.com/@hadimahmood777/passing-parameters-to-power-automate-from-powerapps-4376d7dc0deb?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/4376d7dc0deb</guid>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[microsoft-365]]></category>
            <category><![CDATA[powerapps]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 18:31:41 GMT</pubDate>
            <atom:updated>2024-09-30T18:31:41.661Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog, we will pass parameters to Power Automate flow from PowerApps.</p><h3><strong>Scenario:</strong></h3><p>We will create a SharePoint list, create a customized form for that list and then pass parameters from that customized form to Power Automate. The flow will get values from Power App form, create an item in SharePoint list and send an email to the concerned person with the item details.</p><h3><strong>1. Create SharePoint list</strong></h3><p>Create a SharePoint list named <strong>“Customers Record”</strong> that contains the following columns.</p><ul><li><strong>Name</strong> — Single line of text</li><li><strong>Address</strong> — Multiple lines of text</li><li><strong>Contact</strong> — Number</li></ul><h3><strong>2. Customize form using Power Apps</strong></h3><ul><li>Click on the <strong>“Integrate” , </strong>choose<strong> “PowerApps” </strong>and then choose<strong> “Customize forms”.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*eBO1P8gfni4yoLMb" /></figure><p>You will be redirected to the Power Apps studio and see the following layout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/0*59U0x-jmZVuo0lRV" /></figure><h3><strong>3. Add the Submit button</strong></h3><p>We will add a button for form submissions.</p><ul><li>From the Top-bar, click on the <strong>“Insert” </strong>tab.</li><li>Click on the <strong>“Button”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*EezqQiBJ9OXEglV3" /></figure><p>Now drag and drop the <strong>“Button”</strong> where you want to place it.</p><p>Replace the <strong>“Button”</strong> text with <strong>“Submit”.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/0*xrZ9FODKo4_GW13b" /></figure><h3><strong>4. Create Power Automate flow</strong></h3><p>We will now link the <strong>“Submit”</strong> button to the flow.</p><ul><li>Click on the <strong>“Submit”</strong> button.</li><li>Click on the <strong>“Action” </strong>tab.</li><li>Click on the <strong>“Power Automate”</strong>.</li><li>Click on the <strong>“Create a new flow”</strong>.</li></ul><p>You will be redirected to the <strong>Power Automate</strong> screen.</p><ul><li>Click on the <strong>“Power Apps button” </strong>as shown below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*dTjoNWH0xYw0VB-J" /></figure><p>Now you will see the following screen.</p><ul><li>Click on the <strong>“New step”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*P3Dg-kkWwfN0-mf3" /></figure><p>Create the following three variables.</p><ol><li><strong>varName</strong> for <strong>Name</strong></li><li><strong>varAddress</strong> for <strong>Address</strong></li><li><strong>varContact </strong>for <strong>Contact</strong></li></ol><p>Follow the steps given below to create your first variable.</p><ul><li>Search <strong>“initialize”</strong> in the search bar.</li><li>Click on the <strong>“Initialize variable”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*1mSVdHZ0J9l6Yqw3" /></figure><ul><li>Click on three dots in front of <strong>“Initialize variable”</strong>.</li><li>Rename the instance, to <strong>“CustomerName”</strong> as shown below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*foTX2LHE1QmuIBpE" /></figure><ul><li>Set the variable name to <strong>“varName”</strong>.</li><li>Set the data type to String.</li><li>For value, click in the value bar.</li><li>Click on the <strong>“Ask in PowerApps”</strong> option from the drop-down.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*tQ4N_RPeYCePId6t" /></figure><p>You have successfully initialized one variable for the customer’s <strong>Name</strong>. Now using the same above-mentioned method, initialize two more variables for customer <strong>Address</strong>, and <strong>Contact No.</strong></p><p>Again, click on the <strong>“New step”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*k5lvx4TLxpvGr3D-" /></figure><p><strong>For customer address</strong></p><ul><li>Add a new action of <strong>“Initialize variable”</strong>.</li><li>Rename the action to <strong>“CustomerAddress”</strong>.</li><li>Set the variable name to <strong>“varAddress”</strong>.</li><li>Set the data type to String.</li><li>For value, click in the value bar.</li><li>Click on the <strong>“Ask in PowerApps”</strong> option from the drop-down.</li></ul><p><strong>For customer contact</strong></p><ul><li>Add a new action of <strong>“Initialize variable”</strong>.</li><li>Rename the action to <strong>“CustomerContact”</strong>.</li><li>Set the variable name to <strong>“varContact”</strong>.</li><li>Set the data type to String.</li><li>For value, click in the value bar.</li><li>Click on the <strong>“Ask in PowerApps”</strong> option from the drop-down.</li></ul><p>Again, click on the <strong>“New step”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*CkD2GllwKBUE0cbR" /></figure><ul><li>Search for <strong>“Create item”</strong>.</li><li>Click on <strong>“Create item”</strong> action to add it to the flow.</li><li>Select the <strong>“Site Address”</strong> from the drop-down.</li><li>Select the specific <strong>SharePoint list</strong> on that site, using the drop-down.</li><li>Click on the <strong>“Show advanced options”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*lQbdraesQAxBiFPD" /></figure><p>You will see the fields of <strong>Title</strong>, <strong>Address</strong>, and <strong>Contact No.</strong></p><p>We will add the initialized variables in their respective fields as shown below.</p><ul><li>Click on the <strong>“Title”</strong> field.</li><li>Click on the <strong>“varName”</strong> from the left menu.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*1s98cQLvIdr1lqZ3" /></figure><p>Similarly, add “<strong>varAddress”</strong> in the <strong>Address</strong> field and <strong>“varContact”</strong> in the <strong>Contact No</strong>. field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*MUYL_dYtFuBo_QX3" /></figure><ul><li>Click on the <strong>“New step”</strong>.</li><li>Search for <strong>“Email”</strong>.</li><li>Click on the <strong>“Send an Email (V2)”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*oJJ5YV-qZgFwZQUU" /></figure><p>In this section, we must specify the receiver’s email address, subject, and body of the email.</p><ul><li>Add an email address in the <strong>“To”</strong> field.</li><li>Write the subject of the email in the <strong>“Subject” </strong>field.</li><li>In the <strong>“Body”</strong> section, we will pass the dynamic values of the new record. Just select variables from the left menu to add to the body section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/0*xLkoJdGfG2GcL6ME" /></figure><p>Now click on the <strong>“Save”</strong> button at the top right corner of the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*mA9cTyr_euC4bs1-" /></figure><p>Your flow is created and saved successfully.</p><h3><strong>5. Call the flow from PowerApps</strong></h3><p>Now we will set our flow at the <strong>“Submit”</strong> button.</p><ul><li>Go back to the Power Apps studio tab.</li><li>Click on the <strong>“Submit”</strong> button.</li><li>Click on the <strong>“Action”</strong> tab.</li><li>Click on the <strong>“Power Automate”</strong>.</li><li>Click on the <strong>“Power Apps flow”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*P9YLayY23Uw14t0l" /></figure><ul><li>Click on the <strong>“Submit”</strong> button.</li><li>Copy the code given below and paste it in the top bar as shown below.</li></ul><p><strong>Code:</strong></p><p>PowerAppsFlow.Run(</p><p>DataCardValue1.Text,</p><p>DataCardValue2.Text,</p><p>DataCardValue3.Text</p><p>)</p><p><strong>Code explanation:</strong></p><p>PowerAppsFlow is the name of the flow we created and added on the <strong>“Submit”</strong> button.</p><ul><li>DataCardValue1 passes the value entered in the <strong>“Name”</strong> field.</li><li>DataCardValue2 passes the value entered in the <strong>“Address”</strong> field.</li><li>DataCardValue3 passes the value entered in the <strong>“Contact”</strong> field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*DFj6Vws5UskGTIOu" /></figure><h3><strong>6. Save and Publish the customized form to SharePoint</strong></h3><p>Save and publish the customized form in the SharePoint list.</p><ul><li>Click on the <strong>“File”</strong> in the top right corner.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*inrjskvT3KAYz-iX" /></figure><ul><li>Click on the <strong>“Save”</strong> button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*4n366sku3FRYZsfB" /></figure><ul><li>Click on the <strong>“Publish to SharePoint”</strong> button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*WUsUlt-UvJ0G9r2I" /></figure><p>The form will look like the one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*EaNfnH2w7xJJbup2" /></figure><h3><strong>7. Test the flow</strong></h3><p>Let’s see if everything is working correctly.</p><ul><li>Add a record to the SharePoint list.</li><li>Check the email address that you have entered.</li></ul><p>You will receive an email like the one below and a new item will be created in SharePoint list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*BQ3IDQrTUzC_h1uC" /></figure><p>In this blog, we have successfully created a customized form, added a flow to it, learned how to pass parameters, and successfully gotten an email.</p><h3><strong>That’s IT Folks!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4376d7dc0deb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pass Parameters from One Power Automate Flow to Another]]></title>
            <link>https://medium.com/@hadimahmood777/pass-parameters-from-one-power-automate-flow-to-another-f6a767f484f6?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6a767f484f6</guid>
            <category><![CDATA[power-automate-flow]]></category>
            <category><![CDATA[powerapps]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[microsoft-365]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 18:23:38 GMT</pubDate>
            <atom:updated>2024-09-30T18:23:38.523Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will see how to pass parameters from one flow to another. We can use it to divide large complex flows into small parent and child flows.</p><p>We will create a parent and a child flow. From parent flow, we will pass, the <strong>Email</strong>, <strong>Subject</strong>, and <strong>Body</strong> of the email as parameters to child flow and the child flow will generate the email using the details passed down from parent flow.</p><h3><strong>1. Create Parent Flow</strong></h3><p>Select an <strong>“Instant flow”</strong>, write <strong>“Parent_Flow”</strong> in the <strong>“Flow name” </strong>field, use the <strong>“Manually trigger a flow”</strong> trigger and click on the <strong>“Create”</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*Nx2bah-Y185l4YRC" /></figure><p>Now you will see the following screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*4FJpO7V_MB1kjBgV" /></figure><p>Click on the <strong>“Manually trigger a flow”</strong> action and click on the “<strong>Add an input”</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*A5JNXgJkl7wmV5zB" /></figure><p>Click on the <strong>“Text”</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*94s-QR30IabaGFeI" /></figure><p>Replace the <strong>“Input” </strong>with <strong>“Email”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*nQYGsv5c-npxRqte" /></figure><p>Similarly add two more parameters for the <strong>“Subject”</strong> and <strong>“Body”</strong> of the email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*5PFCO9UqXqt-qFff" /></figure><p>Click on the <strong>“New step”</strong>, add an <strong>“Initialize variable”</strong> action, and rename it to <strong>“EmailDetails”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*CCS7gI1W4PcLz12N" /></figure><p>Write <strong>“varEmailDetails”</strong> in the <strong>“Name”</strong> field and select the <strong>“Object”</strong> as the data type from the <strong>“Type”</strong> dropdown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*sfmn-DfugEImGE5e" /></figure><p>Copy the code given below, paste it into the <strong>“Value”</strong> field of the <strong>“EmailDetails”</strong> action and add related dynamic values from the menu as shown below.</p><p><strong>Code:</strong></p><p>{</p><p>“Email”: “”,</p><p>“Subject”: “”,</p><p>“Body”: “”</p><p>}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*N6C9-fGEYx0n_ATD" /></figure><p>Click on the <strong>“New step”</strong> and add an <strong>“HTTP”</strong> connector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*csOjyaKhSraxWThA" /></figure><p>Select the <strong>“POST”</strong> option from the <strong>“Method”</strong> drop-down and add the <strong>“varEmailDetails”</strong> variable in the <strong>“Body” </strong>field.</p><p><strong>Note:</strong> In the <strong>“URL”</strong> field we will paste the <strong>“URL”</strong> of the child flow <strong>“HTTP”</strong> connector. So, halt this flow here. We will complete it after creating the child flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*XyfNNGOjShp4iw8Q" /></figure><h3><strong>2. Create Child Flow</strong></h3><p>Select an <strong>“Instant flow”</strong>, write <strong>“Child_Flow”</strong> in the <strong>“Flow name” </strong>field, use the <strong>“When an HTTP request is received”</strong> trigger, and click on the <strong>“Create”</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*yxH_mpdPPL3F1vXW" /></figure><p>You will see the following screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*2tkJQQNf_3It4o1K" /></figure><p>Select the <strong>“When an HTTP request is received”</strong> trigger, copy and paste the following JSON schema in the <strong>“Request Body JSON Schema”</strong> field.</p><p><strong>Code:</strong></p><p>{</p><p>“type”: “object”,</p><p>“properties”: {</p><p>“Email”: {</p><p>“type”: “string”</p><p>},</p><p>“Subject”: {</p><p>“type”: “string”</p><p>},</p><p>“Body”: {</p><p>“type”: “string”</p><p>}</p><p>}</p><p>}</p><p>This schema will be used to get values from the <strong>“Parent_Flow”</strong> and store them in their respective fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*Ux5pGOaI6_hbcZMG" /></figure><p>Click on the <strong>“New step”</strong> and add a <strong>“Send an email (V2)”</strong> action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*4CxBOfp9FLntrVjD" /></figure><p>Add <strong>“Email”</strong> in the <strong>“To”</strong> field of the <strong>“Send an email (V2)” </strong>action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*DAx96F2jKK231P9h" /></figure><p>Similarly, add <strong>“Subject”</strong> and <strong>“Body”</strong> parameters in their respective fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*0EcPaWaqPL-q36b0" /></figure><p>Now <strong>“Save”</strong> the flow and copy the flow URL from the <strong>“When an HTTP request is received”</strong> trigger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*28l4I47uP5--ldx0" /></figure><h3><strong>3. Connect Parent and Child Flow</strong></h3><p>Now we will connect both <strong>“Parent_Flow”</strong> and the <strong>“Child_Flow”</strong>.</p><ul><li>Open the <strong>“Parent_Flow”</strong>.</li><li>Select the <strong>“HTTP”</strong> action.</li><li>Paste the <strong>“URL”</strong> of <strong>“Child_Flow”</strong> in the <strong>“URL”</strong> field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*Znfp6onwy5AOn_qb" /></figure><p>Save the flow and test it.</p><h3><strong>4. Testing Flows</strong></h3><p>Open the <strong>“Parent_Flow”</strong> and click on the <strong>“Test”</strong> button at the top right corner of your screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*ASCNEcWXXsgGFMCU" /></figure><p>Select <strong>“Manually”</strong> and click on the <strong>“Save &amp; Test” </strong>button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*DmQgZ7WligAjBnnG" /></figure><p>Write values for input parameters and click on the <strong>“Run”</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*hVvyEawJwmfXxRM-" /></figure><p>Check the email address you entered. You should have received an email with the <strong>“Subject”</strong> and <strong>“Body”</strong> that you have provided.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/0*eKDdFLBpH9XSK82y" /></figure><h3><strong>Conclusion</strong></h3><p>You can pass parameters from one flow to another using an HTTP connector. This becomes very useful when you are dealing with large complex flows. Using this logic, you can easily break down your flow into small parts.</p><h3><strong>That’s IT Folks!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6a767f484f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nested Galleries in PowerApps]]></title>
            <link>https://medium.com/@hadimahmood777/nested-galleries-in-powerapps-f0807fa2328f?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0807fa2328f</guid>
            <category><![CDATA[microsoft-365]]></category>
            <category><![CDATA[powerapps]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[power-automate]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 18:18:29 GMT</pubDate>
            <atom:updated>2024-09-30T18:18:29.167Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will see how to use a nested gallery (gallery in a gallery) to represent the data more effectively and compactly.</p><h3><strong>1. Create a SharePoint list</strong></h3><p>Create a SharePoint list named <strong>“World_Cities”</strong> that contains the following columns.</p><ul><li><strong>Title</strong> — Single line of text</li><li><strong>latitude</strong> — Single line of text</li><li><strong>longitude</strong> — Single line of text</li><li><strong>country</strong> — Single line of text</li><li><strong>population</strong> — Single line of text</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*-nxkcFdn41VfQL6s" /></figure><h3><strong>2. Create an App</strong></h3><p>Go to PowerApps<a href="https://powercloudtechnologies.com/nested-galleries-in-powerapps/"> studio</a>.</p><p>Create a new <strong>“Canvas”</strong> application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*4E_bomkXXLyLVtAG" /></figure><p>Connect the <strong>“World_Cities”</strong> SharePoint list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*PilfkXeQ14YTDd27" /></figure><p>Insert <strong>“Label”</strong> for the heading and fill colors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*6i6nufXeIzuHk5QG" /></figure><p>Insert a <strong>“Blank Flexible Height”</strong> gallery and rename it <strong>“ParentGallery”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*NjtdMa9gsqZ-PlaL" /></figure><p>Connect the <strong>“World_Cities” </strong>SharePoint list with the <strong>“ParentGallery”</strong> as a data source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*WtqoH4n9rfJGQsRC" /></figure><p>Select the <strong>“ParentGallery”</strong> and insert a <strong>“Label”</strong> to show the name of the country.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*2askyhukv3cTrwPD" /></figure><p>Now we will add another gallery to display the cities of the country.</p><p>Select the <strong>“ParentGallery”</strong>, add a <strong>“Blank Vertical” </strong>gallery, and rename it as <strong>“ChildGallery”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*ogvX6EVAG3Y8Y_yf" /></figure><p>Connect the <strong>“World_Cities” </strong>SharePoint list with the <strong>“ChildGallery”</strong> as a data source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*Kl-7uW33iB9say4S" /></figure><p>Insert three <strong>“Labels”</strong> in the <strong>“ChildGallery” </strong>to show the city’s latitude, longitude, and population.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*8ix6TaU14FrtEmyh" /></figure><p>Apply the filter formula on the <strong>“Items”</strong> property of the <strong>“ChildGallery”</strong> so that each record includes the details of that specific record.</p><p>Select the <strong>“Items”</strong> property of the <strong>“ChildGallery”</strong>, copy the code given below, and paste it into the top bar.</p><p><strong>Code:</strong></p><p>Filter(</p><p>world_cities,</p><p>country = ThisItem.country <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*rb9C5qqzk5f5PRPA" /></figure><p>Now add the <strong>“Down”</strong> and <strong>“Up”</strong> icons to hide or show the details.</p><p>Select the <strong>“ParentGallery” </strong>and insert the <strong>“Down”</strong> icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*P_wYHEA9jgrao1yd" /></figure><p>Select the <strong>“OnSelect”</strong> property of the <strong>“Down”</strong> icon, copy the code given below, and paste it into the top bar.</p><p><strong>Code:</strong></p><p>If( <br> varShowCity = ThisItem.country,</p><p>Set(</p><p>varShowCity,</p><p>” “</p><p>),</p><p>Set(</p><p>varShowCity,</p><p>ThisItem.country</p><p>) <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*tiaptAAyn6dp16qo" /></figure><p>Select the <strong>“Visible”</strong> property of the <strong>“ChildGallery”</strong>, copy the code given below, and paste it into the top bar.</p><p><strong>Code:</strong></p><p>Switch( <br> varShowCity,</p><p>” “,</p><p>false,</p><p>ThisItem.country,</p><p>true <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*r8Rb3cjQ8VwE9lo5" /></figure><p>Upon applying this code, the <strong>“ChildGallery”</strong> becomes hidden until the user presses the <strong>“Down”</strong> icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*t0YZCDRIaAoJUWTJ" /></figure><p>Select the <strong>“ParentGallery” </strong>and insert the <strong>“Up”</strong> icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*_dfX-RoUuARtItss" /></figure><p>Select the <strong>“OnSelect”</strong> property of the <strong>“Up”</strong> icon, copy the code given below, and paste it into the top bar.</p><p><strong>Code:</strong></p><p>If( <br> varShowCity = ThisItem.country,</p><p>Set(</p><p>varShowCity,</p><p>” “</p><p>),</p><p>Set(</p><p>varShowCity,</p><p>ThisItem.country</p><p>) <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*Re2uHY_wcM1NKLPi" /></figure><p>Select the <strong>“Visible”</strong> property of the <strong>“Up”</strong> icon, copy the code given below, and paste it into the top bar.</p><p><strong>Code:</strong></p><p>Switch( <br> varShowCity,</p><p>” “,</p><p>false,</p><p>ThisItem.country,</p><p>true,</p><p>false <br>)</p><p>This code hides the <strong>“Up” </strong>icon and shows the <strong>“Down” </strong>icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*2VAa0g3-GjS8GeVb" /></figure><p>Select the <strong>“Visible”</strong> property of the <strong>“Down”</strong> icon, copy the code given below, and paste it into the top bar.</p><p><strong>Code:</strong></p><p>Switch(</p><p>varShowCity,</p><p>” “,</p><p>true,</p><p>ThisItem.country,</p><p>false,</p><p>true <br>)</p><p>This code hides the <strong>“Down” </strong>icon and shows the <strong>“Up” </strong>icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*6WvmrZ5G5jTV6wZc" /></figure><h3><strong>3. Testing</strong></h3><p>At the start, the user only sees the <strong>“ParentGallery”</strong> like the one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*0Uf_Zm58F_L-t6Sd" /></figure><p>When the user clicks the <strong>“Down”</strong> button, the <strong>“ChildGallery” </strong>and<strong> “Up”</strong> icons become visible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*J6CYET4aLocASk3y" /></figure><p>When the user clicks the <strong>“Up”</strong> icon, it hides the <strong>“ChildGallery”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*9_eelaYRWoLoQloe" /></figure><h3><strong>That’s IT Folks!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0807fa2328f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Data Sorting in PowerApps: Tips and Tricks]]></title>
            <link>https://medium.com/@hadimahmood777/mastering-data-sorting-in-powerapps-tips-and-tricks-cdc48aeb8835?source=rss-ac9859ec82e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdc48aeb8835</guid>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[sorting]]></category>
            <category><![CDATA[powerapps]]></category>
            <category><![CDATA[microsoft-365]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Hadi Mahmood]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 18:00:24 GMT</pubDate>
            <atom:updated>2024-09-30T18:00:24.251Z</atom:updated>
            <content:encoded><![CDATA[<p>This article will demonstrate how to link a SharePoint list with a Power Apps gallery and sort its items in either ascending or descending order based on various column values.</p><h3><strong>1. Create a SharePoint list</strong></h3><p>We need to store the records of the customers in a SharePoint list.</p><p>Create a <strong>“Customers Record”</strong> SharePoint list that contains the following columns.</p><ul><li><strong>Name (Title)</strong> — Single line of text</li><li><strong>Address</strong> — Multiple lines of text</li><li><strong>Contact No.</strong> — Single line of text</li><li><strong>Status</strong> — Choice (Regular or Not Regular customer)</li><li><strong>Calculated_Status</strong> — Calculated column (with status value as text)</li></ul><h3><strong>2. Create an App</strong></h3><p>Go to PowerApps<a href="https://powercloudtechnologies.com/mastering-data-sorting-in-powerapps-tips-and-tricks/"> studio</a>.</p><p>Create a <strong>“Canvas”</strong> PowerApps application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*TlVKCcBEFmYVH4tc" /></figure><p>You will see the following screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*B8cenDGu7KrSfxNJ" /></figure><p>Connect the <strong>“Customers Record”</strong> SharePoint list with the app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*zwDu9uQ8TCcie0Kj" /></figure><p>Click on the <strong>“Insert”</strong> tab, add a <strong>“Blank vertical”</strong> gallery, and rename it <strong>“CustomersGallery”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*pQMiIQ8i9kPrhxsD" /></figure><p>Select the <strong>“Items”</strong> property of the <strong>“CustomersGallery” </strong>and write the <strong>“Customers Record”</strong> SharePoint list name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*tIhRMY5JVsBFIfWb" /></figure><p>Insert labels in the <strong>“CustomersGallery”</strong> to showthe<strong> “Name”</strong>, <strong>“Address”</strong>, <strong>“Contact No”</strong>, and<strong> “Status”</strong> of the customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*6Uozo7X5yIdk3NYz" /></figure><p>Insert labels for the headings and add background colors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*7c22IyIhWTRWcBWH" /></figure><p>In this step, we will add <strong>“Sort”</strong> icons that will be used as a button for sorting the records.</p><p>Click on the <strong>“Insert” </strong>tab and add a <strong>“Sort”</strong> icon for each column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*_KPyyjdNWZpfbrt7" /></figure><p>Drag and drop the<strong> “Sort”</strong> icons beside each column’s name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*A6_Ca_Gp7tatRtDQ" /></figure><p>Select the <strong>“OnVisible”</strong> property of the <strong>screen, </strong>copy the code given below, and paste it into the top bar.</p><p><strong>Code:</strong></p><p>UpdateContext( <br> {</p><p>SortPriority: “Title”,</p><p>SortDescending: !SortDescending</p><p>} <br>)</p><p>This code initializes two variables that will be used for sorting the items.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*LDZde384d1D8lrQ-" /></figure><p>Select the <strong>“Items”</strong> property of the <strong>“CustomersGallery”</strong>, copy the code given below, and paste it into the top bar.</p><p><strong>Code:</strong></p><p>SortByColumns (</p><p>‘Customers Record’,</p><p>SortPriority,</p><p>If(</p><p>SortDescending,</p><p>SortOrder.Ascending,</p><p>SortOrder.Descending</p><p>) <br>)</p><p><strong>Code explanation:</strong></p><p><strong>SortByColumns</strong> is a built-in function.</p><p><strong>‘Customers Record’</strong> is the name of the SharePoint list.</p><p><strong>SortPriority</strong> is the name of the variable.</p><p><strong>If(SortDescending,Ascending,Descending))</strong> SortDescending is a variable that we declared here.</p><p><strong>“If</strong> <strong>condition”</strong> checks if the<strong> SortDescending</strong> has a value stored in it, then the sort order will be <strong>Ascending</strong>, otherwise the sort order will be <strong>Descending</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*noO-rbnwH_ZYJPIv" /></figure><p>Now we will add formulas to the <strong>“Sort”</strong> icons.</p><p>Select the <strong>“OnSelect”</strong> property of the <strong>“Sort”</strong> icon of the <strong>“Name” </strong>column.</p><p>Copy the code given below and paste it into the top bar.</p><p><strong>Code:</strong></p><p>UpdateContext(</p><p>{</p><p>SortPriority: “Title”,</p><p>SortDescending: !SortDescending</p><p>} <br>)</p><p><strong>Code explanation:</strong></p><p><strong>UpdateContext</strong> is a built-in function.</p><p><strong>SortPriority: “Title”</strong> assigns the Title value to the variable.<strong>SortDescending:!SortDescending</strong> reverses the value of the <strong>“SortDescending” </strong>variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*PryLGDhlbfIgl5-F" /></figure><p>Select the <strong>“OnSelect”</strong> property of the <strong>“Sort”</strong> icon of the <strong>“Address” </strong>column.</p><p>Copy the code given below and paste it in the top bar.</p><p><strong>Code:</strong></p><p>UpdateContext( <br> {</p><p>SortPriority: “Address”,</p><p>SortDescending: !SortDescending</p><p>} <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*3_FcGbg6WcWwUfG0" /></figure><p>Select the <strong>“OnSelect”</strong> property of the <strong>“Sort”</strong> icon of the <strong>“Contact No.” </strong>column.</p><p>Copy the code given below and paste it into the top bar.</p><p><strong>Code:</strong></p><p>UpdateContext(</p><p>{</p><p>SortPriority: “Contact_No”,</p><p>SortDescending: !SortDescending</p><p>} <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*5k8DRYsnxS2Nw4ep" /></figure><p>Select the <strong>“OnSelect”</strong> property of the <strong>“Sort”</strong> icon of the <strong>“Status” </strong>column.</p><p>Copy the code given below and paste it in the top bar.</p><p><strong>Code:</strong></p><p>UpdateContext( <br> {</p><p>SortPriority: “Calculated_Status”,</p><p>SortDescending: !SortDescending</p><p>} <br>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*Q7KlCCCzIn1DGNfn" /></figure><p><strong>Note: </strong>The <strong>“Sort”</strong> icon beside the <strong>“Status”</strong> column, is using the value of<strong> “Calculated_Status” </strong>column.</p><p>The <strong>“Status” </strong>column is of type choice, this formula may not work on the <strong>“Choice”</strong> type column. So, we stored the <strong>“Status”</strong> choice value as a text value in the <strong>“Calculated_Status”</strong> column.</p><h3><strong>3. Testing</strong></h3><p>You can test the <strong>“Sort”</strong> function, using the preview application option.</p><p>The final layout of the application will look like the one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*8R-o7xu1u75EHEUf" /></figure><p>Click on the <strong>“Sort”</strong> icon of the <strong>“Name”</strong> column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*KisYnOtAEgkWYYBN" /></figure><p>Click on the <strong>“Sort”</strong> icon of the <strong>“Address”</strong> column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*9dTM5rE0jXogha-5" /></figure><p>Click on the <strong>“Sort”</strong> icon of the <strong>“Contact No.”</strong> column.</p><p>Click on the <strong>“Sort”</strong> icon of the <strong>“Status”</strong> column.</p><h3><strong>Conclusion</strong></h3><p>We have sorted the PowerApps gallery based on ascending or descending order of <strong>“Text”</strong>, <strong>“Number”</strong>, and <strong>“Choice”</strong> type columns.</p><h3><strong>That’s IT Folks!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdc48aeb8835" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>