Skip to content

Instantly share code, notes, and snippets.

Avatar

Dennis expiscornovus

View GitHub Profile
View GetChangedColumnsviaXpath.json
{
"inputs": {
"from": "@xpath(xml(json(concat('{\"Columns\":',string(outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/ColumnHasChanged']),'}'))), '//Columns/*[text() = \"true\"]')",
"select": "@substring(base64ToString(item()['$content']), 1, sub(indexOf(base64ToString(item()['$content']), '>'), 1))"
}
}
Kudos to Paul Murana for finding this solution.
@expiscornovus
expiscornovus / AddNewRow_optionsetlabel.json
Created Oct 23, 2021
Add New Row with option set label from Microsoft Dataverse
View AddNewRow_optionsetlabel.json
{
"inputs": {
"host": {
"connectionName": "shared_commondataserviceforapps",
"operationId": "CreateRecord",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps"
},
"parameters": {
"entityName": "accounts",
"item/name": "@outputs('Get_response_details')?['body/r61cdb20ec12b497fad5111e99fcb1b6c']",
@expiscornovus
expiscornovus / FilterOptionSetLabel.json
Created Oct 23, 2021
Filter OptionSet Label Microsoft Dataverse
View FilterOptionSetLabel.json
{
"inputs": {
"from": "@body('HTTP_-_Retrieve_optionset_value')['OptionSet']['Options']",
"where": "@equals(item()?['Label']['LocalizedLabels'][0]['Label'], outputs('Get_response_details')?['body/rf76f8476b5334d39bdcc86f636c5fb87'])"
}
}
@expiscornovus
expiscornovus / GetLocalOptionSetMicrosoftDataverse.json
Created Oct 11, 2021
Get Local Option Set from Microsoft Dataverse via HTTP action in Power Automate
View GetLocalOptionSetMicrosoftDataverse.json
{
"inputs": {
"method": "GET",
"uri": "@{variables('EnvironmentUrl')}/api/data/v9.1/EntityDefinitions(LogicalName='@{variables('Table')}')/Attributes(LogicalName='@{variables('Column')}')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=OptionSet($select=Options)",
"headers": {
"Content-Type": "application/json",
"OData-MaxVersion": "4.0",
"OData-Version": "4.0"
},
"authentication": {
View IntersectionUniqueSubtotal.json
intersection(body('Select'),body('Select'))
View SelectGroupByCount.json
{
"inputs": {
"from": "@outputs('Send_an_HTTP_request_to_SharePoint_-_GetByTitle')?['body']['Listdata']['Row']",
"select": {
"Course": "@item()?['Course']",
"Attendees": "@item()?['Course.COUNT.group']"
}
}
}
@expiscornovus
expiscornovus / GetCountAggregateListView.json
Last active Oct 7, 2021
Get Count Aggregate List View
View GetCountAggregateListView.json
{
"inputs": {
"host": {
"connectionName": "shared_sharepointonline",
"operationId": "HttpRequest",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
},
"parameters": {
"dataset": "https://contoso.sharepoint.com/sites/testsite",
"parameters/method": "POST",
@expiscornovus
expiscornovus / HTTPRetrieveDuplicatedBugWorkItemsfromAzureDevOps.json
Created Oct 5, 2021
HTTP Retrieve Duplicated Bug WorkItems from Azure DevOps Extended Analytics OData feed
View HTTPRetrieveDuplicatedBugWorkItemsfromAzureDevOps.json
{
"inputs": {
"method": "GET",
"uri": "https://analytics.dev.azure.com/@{variables('Organisation')}/@{variables('Project')}/_odata/v2.0/workItems?$select=WorkItemId,Title,WorkItemType,State&$expand=Links($select=SourceWorkItemId,TargetWorkItemId,LinkTypeName)&$filter=WorkItemId eq @{variables('WorkItemId')}",
"authentication": {
"type": "Basic",
"username": "SomeRandomName",
"password": "@parameters('PersonalAccessToken_AzureDevOps')"
}
},
@expiscornovus
expiscornovus / Performanunboundaction_merge.json
Created Oct 1, 2021
Perform an unbound action merge Microsoft Dataverse
View Performanunboundaction_merge.json
{
"actionName": "Merge",
"item/Target": {
"name": "@{outputs('Get_a_row_by_ID_-_Account1')?['body/name']}",
"accountid": "@{outputs('Get_a_row_by_ID_-_Account1')?['body/accountid']}",
"@@odata.type": "Microsoft.Dynamics.CRM.account"
},
"item/Subordinate": {
"name": "@{outputs('Get_a_row_by_ID_-_Account2')?['body/name']}",
"accountid": "@{outputs('Get_a_row_by_ID_-_Account2')?['body/accountid']}",
@expiscornovus
expiscornovus / GetAddressIORequest.json
Created Sep 26, 2021
GetAddress IO Request in HTTP action
View GetAddressIORequest.json
https://api.getAddress.io/find/@{variables('PostCode')}/@{variables('House')}?api-key=@{variables('ApiKey')}&expand=true