Skip to main content

Posts

Showing posts from November, 2019

List Item Count in SharePoint Online

Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" function GetListItemCount($siteUrl) {     #*** you can also move below line outside the function to get rid of login again if you need to call the function multiple time. ***     $Cred= Get-Credential       $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteURL)     $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)     $ctx.Credentials = $credentials     $web = $ctx.Web     $lists = $web.Lists     $ctx.Load($lists)     $ctx.ExecuteQuery()     Write-Host -ForegroundColor Yellow "The site URL is" $siteUrl     #output the...

Embedding PowerApps As A Web Part On SharePoint Page

It is now possible to embed PowerApps into SharePoint Online pages as web parts using iframes. The PowerApps and the SharePoint Site (where the app is to be embedded) need to be part of the same Office 365 Tenancy. Although an app with mobile layout can be embedded on the SharePoint page, for better usability and look-feel, it is recommended to create an app with tab layout. I have used the ‘Asset Checkout’ tab layout default template from PowerApps to create the app. To embed the app in a SharePoint Page, we will need to generate the embeddable URI for the app. For this, get the App id. Go to the app details page on web.powerapps.com and the app id will be listed as a GUID on the app's details page. The iframe code is as follows -  <iframe width="98%" height="98%" src="https://web.powerapps.com/webplayer/iframeapp?hideNavBar=true&source=iframe&screenColor=rgba(104,101,171,1)&appId=/providers/Microsoft.PowerApps/apps/[yourAppID...