Category: PowerApps

Part – 1 Expand-Collapse rows in PowerApps Canvas App Gallery


n this blog post, I have shown the steps for creating the expand-collapse gallery control in Canvas App.

Now, let’s start building the gallery, for which we would have to create out list first and have the same loaded in a PowerApps App as a data source.

Step 1 – Create “Expand-Collapse Control” list with the following columns and their types.

Step 2 – Add entries in “Expand-Collapse Control” list

Step 3 – Create canvas app and name it “Expand-Collapse App”

  1. Add a new Blank screen
  2. From the controls section on the top in Insert tab, add a “Blank flexible height” gallery which would be our Parent Gallery
  3. And add a “Blank vertical” gallery in “Blank flexible height” gallery – which would be our Child Gallery
  • Parent Gallery
  • Child Gallery

Step 4 – Adding the data source to Gallery

In Parent Gallery add “Expand – Collapse Control” list data

For Child Gallery in “items” property add code – ThisItem

Step 5 – Add labels according list’s columns and add show data

Step 6 – Add code on all label’s “visible” property which are added in “Child Gallery”. Also, to have the Child Gallery show when button is clicked, we have to add code in Child Gallery’s on “Visible” property

“Visible” property – Switch(varShowId,0,false,ThisItem.ID,true)

Step 7 – Add down arrow icon and up arrow icon.

Then first write code on down arrow icon(Down arrow icon) it’s “OnSelect” property – If(varShowId=ThisItem.ID,Set(varShowId,0),Set(varShowId,ThisItem.ID))

And add code on visible property – If(Up arrow icon.Visible=true,false,true)

Step 8 – On  the down arrow icon and write code on it’s “OnSelect” property – If(varShowId=ThisItem.ID,Set(varShowId,0),Set(varShowId,ThisItem.ID))

And write code on it’s “Visible” property – Switch(varShowId,0,false,ThisItem.ID,true)

That’s all,

We have finally created the collapsible Gallery control in Power App.

Hope this helps!!


Thank you,
Jaydeep Patel

Publish Power App to the Teams App Store



n this blog, I am performing the steps one should follow to publish your PowerApps to the Teams App Store.


Let’s get started- 



From the PowerApps portal, Click Apps in the app bar. 



To the right of your app name, Click the menu then select Add to Teams. 


In the Add to Teams pane, click Add to Teams. 

Note: you may want to first click Edit details to add a short description, so your users know what‘s expected when using this app. You can also expand Advanced settings to add further information. For example, you can include a link to instructions if you‘d like. 


Power Apps will open Teams. Your browser may request access to open in the desktop app. If you prefer that, allow it. If not, click Cancel then click Use the web app instead.


Once Teams opens to the app details page, click Add. 


The app opens from the Teams app bar. 


Right-click the app icon to pin it to stay.

PowerApps – Role Based Security Using SharePoint Group


hile creating a PowerApps app, we needed to add a button that would be visible only for a particular set of users who were present in a specific group in SharePoint. This was accomplished with the help of Flow.

We would check with the help of Flow that the user that is trying to access the App, is present in the group or not. If yes, the button is available and if not, the button won’t be.

The approach goes like,


Create a SharePoint Security Group and add the users who would have the access to the button in PowerApps App.

And enable the access to view the members of the Group to Everyone, so that when the user tries to login, not all users would be in the group.


Creating the Flow

  • Create the Flow, with the trigger PowerApps of PowerApps connector.
  • Add an action, Initialize variable of Variables connector. Set the name as isAdministrator to store a Boolean value.
  • Add another Initialize variable of Variables connector. Set the name as UserGroupInfo to store a Boolean value.
  • Add an action, Send an HTTP request to SharePoint of SharePoint connector.

Site Address – Select the site address where the security group is created
Method – GET
Uri – api/web/sitegroups/getByName(‘SharePoint Group’)/Users?$filter=Email eq ‘’
Replace the SharePoint Group with the name of the group created in Step-1. Here I had created the group ‘Line Manager’.
Put the cursor pointer in between the single quotes and select the option from PowerApps, SendanHTTPrequesttoSharePoint_Uri from dynamic content window.

  • Add an action, Set Variable of Variable connector. Select the variable UserGroupInfo in Name and value as Body from Send an HTTP request to SharePoint from dynamic content.
  • Add an action, Condition of Control Connector. Set the conditional value as variable UserGroupInfo and select the condition is not equal to and in value to be compared as ‘[]’.Inside the if yes and if no options,

For option if yes, add an action Set Variable of Variable connector. Select the variable isAdministrator and set the value as true,

For option if no, add an action Set Variable of Variable connector. Select the variable isAdministrator and set the value as false.

  • Add an action, Respond to PowerApps of PowerApps connector. Select the text option for the output. Set the variable as isAdminUser and the value as isAdministrator from the Dynamic content.

The final look of the flow would be like this,


Implementing the Flow with PowerApps App

After the flow is ready, lets configure the same with the App to test it.

On the first screen that would be visible when you run the App, on its OnVisible Property, set the variables as below

First, we take the variable isAdmin and set it as false.

Secondly, we would check with the flow to set the variable UserGroupInfo as the flow’s outcome.

On the button’s visible property, set it as If(isAdmin, true). SO that if the user is in the SharePoint Group the button would be visible else it would not.

So when a user is inside the SharePoint Group, the screen would display the button,

And when the user is not,