- Home
- Blog
Blog
PowerAutomate Add User To Group
On 19/09/2021
Powerautomate add user to sharepoint group
Ajouter un utilisateur dans un groupe sharepoint en REST avec powerautomate
{"__metadata":{"type":"SP.User"},"LoginName":"i:0#.f|membership|@{variables('emailToAdd')}"}
{
"siteUrl": "https://vvvvvvvvvvvvvvv.com",
"Accept": "Accept",
"ApplicationJson": "application/json; odata=verbose",
"ContentType": "content-type"
}
Gulp Bundle Issue Cannot Read Property Id Of Undefined
On 08/06/2021
Gulp bundle issue : Cannot read property 'id' of undefined
Gulp bundle issue : Field 'browser' doesn't contain a valid alias configuration
Gulp bundle issue : sub task errored after
Check that in your tsconfig.json, you've got this below :
"include": [
"src/**/*.ts", "src/**/*.tsx"
],
and not :
"include": [
"src/**/*.tsx"
],
PowerApps Build String To Link
On 31/05/2021
Powerapps build your string to creae an html link
<div style="background-color:#000000;width:100%;"><code><a href="https://mySP.sharepoint.com/sites/DfSite/Lists/Initiatives/DispForm.aspx?ID="; InitiativeId; "" style="color:#FFFFFF;height:100px">";SelectedInitiative.Titre;"</a></code></div>
Powerautomate Add Comment To ListItem
On 27/05/2021
Add comment to ListItem with powerautomate (http Sharepoint request)
PowerAutomate Update ListItem HTTP REST
On 27/05/2021
Update a list item with http request with powerautomate
{
"Accept": "application/json; odata=verbose",
"content-type": "application/json; odata=verbose",
"X-HTTP-Method": "MERGE",
"If-Match": "*"
}
Add WebPart On Modern Page PNP Powershell
On 07/05/2021
Add custom WebPart On Modern Page Powershell
List your webpart with :
$page = Get-PnPPage -Identity "aTestDisp2.aspx"
$page.AvailablePageComponents() select your webpart by name or guid
param([string]$siteUrl="https://myyTenant.sharepoint.com/sites/muSite", [string]$pageName="aTestDisp2", [string]$webPartName="Test - Display Item") clear Connect-PnPOnline -Url $siteUrl -UseWebLogin #set your wenpart properties $wpProps = @{webUrl="https://myyTenantsharepoint.com/sites/
muSite" listId="b4d5f780-bd74-4cd5-b051-fed423e43125" field="Title" itemId="1"} #get the page $page = Get-PnPPage -Identity $pageName # get the target webpart $wp = $page.AvailablePageComponents() | Where-Object {$_.Name -eq $webPartName } if($wp -eq $null) { Write-Host "webpart '$($webPartName)' not found " -ForegroundColor:Red } #Add webpart with default user, to column 1 in section 1 Add-PnPPageWebPart -Page $pageName -Component $wp -Section 1 -Column 1 -WebPartProperties $wpProps
Disconnect-PnPOnline
You can check webpart properties, in result
Get Sharepoint List Items Count
On 02/04/2021
Get Sharepoint list Items count
var xhr = new XMLHttpRequest();
console.clear();
var url = "https://mySiteUrl";
xhr.open('GET', url + "/_api/web/Lists/getbytitle('TheListName')?$select=ItemCount,Title");
xhr.setRequestHeader("Accept", "application/json; odata=verbose");
xhr.onload = function () {
if (xhr.status === 200) {
var kk = JSON.parse(xhr.responseText);
console.dir(kk.d.Title + " Item Count : " + kk.d.ItemCount);
}
else {
console.dir(xhr);
alert('Request failed. Returned status of ' + xhr.status);
}
};
xhr.send();
In your browser you must be your your site url, push key F12 paste above code in console, en push enter
fr