Skip to content

Commit fba8364

Browse files
Merge pull request #144 from Solanki-Manish/Sharing-PowerAutomateSamples
Utility flow to perform aggregate operations
2 parents caddaea + ddee0a4 commit fba8364

File tree

8 files changed

+541
-0
lines changed

8 files changed

+541
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Utility flow to extract number by length
2+
3+
## Summary
4+
5+
This sample is a reusable child cloud flow that can be used for performing aggregate operations (Avg, Count, Min, Max & Sum) on array of objects. This flow also demonstrate how we can leverage powerful XML and XPATH functions in fx expression for complex automation scenerios.
6+
7+
![Flow overview](./assets/flow-overview.png "Flow overview")
8+
9+
## Applies to
10+
11+
![Power Automate](https://img.shields.io/badge/Power%20Automate-Yes-green "Yes")
12+
13+
## Compatibility
14+
15+
![Premium License](https://img.shields.io/badge/Premium%20License-Not%20Required-green.svg "Does not use Premium license")
16+
![On-Premises Connectors](https://img.shields.io/badge/On--Premises%20Connectors-No-green.svg "Does not use on-premise connectors")
17+
![Custom Connectors](https://img.shields.io/badge/Custom%20Connectors-Not%20Required-green.svg "Does not use custom connectors")
18+
19+
## Contributors
20+
21+
* [Manish Solanki](https://github.com/Solanki-Manish)
22+
23+
## Version history
24+
25+
Version|Date|Comments
26+
-------|----|--------
27+
1.0|Apr 20, 2025|Initial release
28+
29+
## Prerequisites
30+
31+
The caller parent flow should be solution aware to call this child flow using "Run a Child Flow" action.
32+
33+
## Minimal Path to Awesome
34+
35+
### Import Solution
36+
37+
* [Download](./solution/utility-flow-for-aggregrate-operations-on-array.zip) the `.zip` from the `solution` folder
38+
* [Import](https://learn.microsoft.com/en-us/power-apps/maker/data-platform/import-update-export-solutions) the `.zip` file using **Solutions** > **Import Solution**.
39+
40+
### Using the source code
41+
42+
You can also use the [Power Apps CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli) to pack the source code by following these steps:
43+
44+
* Clone the repository to a local drive
45+
* Pack the source files back into a solution `.zip` file:
46+
47+
```bash
48+
pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasApps
49+
```
50+
51+
Making sure to replace `pathtosourcefolder` to point to the path to this sample's `sourcecode` folder, and `pathtodestinationfile` to point to the path of this solution's `.zip` file (located under the `solution` folder)
52+
* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
53+
54+
## Features
55+
56+
This sample illustrates the following concepts:
57+
58+
* Reusablility
59+
* Use of XML & XPATH for complex automation scenerios
60+
* Use of complex nested expressions
61+
* Concept of parent-child flow
62+
63+
## Help
64+
65+
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
66+
67+
If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=utility-flow-for-aggregrate-operations-on-array&authors=@Solanki-Manish&title=utility-flow-for-aggregrate-operations-on-array).
68+
69+
For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=utility-flow-for-aggregrate-operations-on-array&authors=@Solanki-Manish&title=utility-flow-for-aggregrate-operations-on-array).
70+
71+
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=utility-flow-for-aggregrate-operations-on-array&authors=@Solanki-Manish&title=utility-flow-for-aggregrate-operations-on-array).
72+
73+
## Disclaimer
74+
75+
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
76+
77+
<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/utility-flow-for-aggregrate-operations-on-array" aria-hidden="true" />
77.8 KB
Loading
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
[
2+
{
3+
"name": "pnp-powerplatform-samples-utility-flow-for-aggregrate-operations-on-array",
4+
"source": "pnp",
5+
"title": "Aggregate operations on array of objects",
6+
"shortDescription": "Flow that allow performing aggregate operations (Avg, Count, Min, Max & Sum) on array of objects.",
7+
"url": "https://github.com/pnp/powerplatform-samples/tree/main/samples/utility-flow-for-aggregrate-operations-on-array",
8+
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/powerplatform-samples/tree/main/samples/utility-flow-for-aggregrate-operations-on-array",
9+
"longDescription": [
10+
"This sample is a reusable child cloud flow that can be used for performing aggregate operations (Avg, Count, Min, Max & Sum) on array of objects. This flow also demonstrate how we can leverage powerful XML and XPATH functions in fx expression for complex automation scenerios."
11+
],
12+
"creationDateTime": "2025-04-20",
13+
"updateDateTime": "2025-04-20",
14+
"products": [
15+
"Power Automate",
16+
"Power Platform"
17+
],
18+
"tags": [
19+
"reusability",
20+
"XML",
21+
"expression",
22+
"XPATH",
23+
"Aggregate function",
24+
"child flow"
25+
],
26+
"categories": [
27+
"CLOUD-FLOW"
28+
],
29+
"metadata": [
30+
{
31+
"key": "POWERAPPS-EXPERIMENTAL",
32+
"value": "No"
33+
},
34+
{
35+
"key": "POWERAPPS-PREMIUM",
36+
"value": "No"
37+
},
38+
{
39+
"key": "POWERAPPS-ONPREM",
40+
"value": "No"
41+
},
42+
{
43+
"key": "POWERAPPS-CUSTOMCONNECTOR",
44+
"value": "No"
45+
}
46+
],
47+
"thumbnails": [
48+
{
49+
"type": "image",
50+
"order": 100,
51+
"url": "https://github.com/pnp/powerplatform-samples/raw/main/samples/utility-flow-for-aggregrate-operations-on-array/assets/flow-overview.png",
52+
"alt": "Flow overview"
53+
}
54+
],
55+
"authors": [
56+
{
57+
"gitHubAccount": "https://github.com/Solanki-Manish",
58+
"pictureUrl": "https://github.com/Solanki-Manish.png",
59+
"name": "Manish Solanki"
60+
}
61+
],
62+
"references": [
63+
{
64+
"name": "Microsoft Power Platform documentation",
65+
"description": "Discover how to make the most of Microsoft Power Platform products with online training courses, docs, and videos covering product capabilities and how-to guides.",
66+
"url": "https://learn.microsoft.com/power-platform/"
67+
}
68+
]
69+
}
70+
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" OrganizationVersion="9.2.25041.158" OrganizationSchemaType="Standard" CRMServerServiceabilityVersion="9.2.25042.00166">
3+
<Entities />
4+
<Roles />
5+
<Workflows />
6+
<FieldSecurityProfiles />
7+
<Templates />
8+
<EntityMaps />
9+
<EntityRelationships />
10+
<OrganizationSettings />
11+
<optionsets />
12+
<CustomControls />
13+
<EntityDataProviders />
14+
<Languages>
15+
<Language>1033</Language>
16+
</Languages>
17+
</ImportExportXml>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ImportExportXml version="9.2.25041.158" SolutionPackageVersion="9.2" languagecode="1033" generatedBy="CrmLive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" OrganizationVersion="9.2.25041.158" OrganizationSchemaType="Standard" CRMServerServiceabilityVersion="9.2.25042.00166">
3+
<SolutionManifest>
4+
<UniqueName>Utilityflow</UniqueName>
5+
<LocalizedNames>
6+
<LocalizedName description="Utility flow" languagecode="1033" />
7+
</LocalizedNames>
8+
<Descriptions />
9+
<Version>1.0.0.0</Version>
10+
<Managed>2</Managed>
11+
<Publisher>
12+
<UniqueName>PnP</UniqueName>
13+
<LocalizedNames>
14+
<LocalizedName description="PnP" languagecode="1033" />
15+
</LocalizedNames>
16+
<Descriptions />
17+
<EMailAddress xsi:nil="true"></EMailAddress>
18+
<SupportingWebsiteUrl xsi:nil="true"></SupportingWebsiteUrl>
19+
<CustomizationPrefix>pnp</CustomizationPrefix>
20+
<CustomizationOptionValuePrefix>89378</CustomizationOptionValuePrefix>
21+
<Addresses>
22+
<Address>
23+
<AddressNumber>1</AddressNumber>
24+
<AddressTypeCode>1</AddressTypeCode>
25+
<City xsi:nil="true"></City>
26+
<County xsi:nil="true"></County>
27+
<Country xsi:nil="true"></Country>
28+
<Fax xsi:nil="true"></Fax>
29+
<FreightTermsCode xsi:nil="true"></FreightTermsCode>
30+
<ImportSequenceNumber xsi:nil="true"></ImportSequenceNumber>
31+
<Latitude xsi:nil="true"></Latitude>
32+
<Line1 xsi:nil="true"></Line1>
33+
<Line2 xsi:nil="true"></Line2>
34+
<Line3 xsi:nil="true"></Line3>
35+
<Longitude xsi:nil="true"></Longitude>
36+
<Name xsi:nil="true"></Name>
37+
<PostalCode xsi:nil="true"></PostalCode>
38+
<PostOfficeBox xsi:nil="true"></PostOfficeBox>
39+
<PrimaryContactName xsi:nil="true"></PrimaryContactName>
40+
<ShippingMethodCode>1</ShippingMethodCode>
41+
<StateOrProvince xsi:nil="true"></StateOrProvince>
42+
<Telephone1 xsi:nil="true"></Telephone1>
43+
<Telephone2 xsi:nil="true"></Telephone2>
44+
<Telephone3 xsi:nil="true"></Telephone3>
45+
<TimeZoneRuleVersionNumber xsi:nil="true"></TimeZoneRuleVersionNumber>
46+
<UPSZone xsi:nil="true"></UPSZone>
47+
<UTCOffset xsi:nil="true"></UTCOffset>
48+
<UTCConversionTimeZoneCode xsi:nil="true"></UTCConversionTimeZoneCode>
49+
</Address>
50+
<Address>
51+
<AddressNumber>2</AddressNumber>
52+
<AddressTypeCode>1</AddressTypeCode>
53+
<City xsi:nil="true"></City>
54+
<County xsi:nil="true"></County>
55+
<Country xsi:nil="true"></Country>
56+
<Fax xsi:nil="true"></Fax>
57+
<FreightTermsCode xsi:nil="true"></FreightTermsCode>
58+
<ImportSequenceNumber xsi:nil="true"></ImportSequenceNumber>
59+
<Latitude xsi:nil="true"></Latitude>
60+
<Line1 xsi:nil="true"></Line1>
61+
<Line2 xsi:nil="true"></Line2>
62+
<Line3 xsi:nil="true"></Line3>
63+
<Longitude xsi:nil="true"></Longitude>
64+
<Name xsi:nil="true"></Name>
65+
<PostalCode xsi:nil="true"></PostalCode>
66+
<PostOfficeBox xsi:nil="true"></PostOfficeBox>
67+
<PrimaryContactName xsi:nil="true"></PrimaryContactName>
68+
<ShippingMethodCode>1</ShippingMethodCode>
69+
<StateOrProvince xsi:nil="true"></StateOrProvince>
70+
<Telephone1 xsi:nil="true"></Telephone1>
71+
<Telephone2 xsi:nil="true"></Telephone2>
72+
<Telephone3 xsi:nil="true"></Telephone3>
73+
<TimeZoneRuleVersionNumber xsi:nil="true"></TimeZoneRuleVersionNumber>
74+
<UPSZone xsi:nil="true"></UPSZone>
75+
<UTCOffset xsi:nil="true"></UTCOffset>
76+
<UTCConversionTimeZoneCode xsi:nil="true"></UTCConversionTimeZoneCode>
77+
</Address>
78+
</Addresses>
79+
</Publisher>
80+
<RootComponents>
81+
<RootComponent type="29" id="{7995e00c-031e-f011-9989-000d3a99d186}" behavior="0" />
82+
</RootComponents>
83+
<MissingDependencies />
84+
</SolutionManifest>
85+
</ImportExportXml>

0 commit comments

Comments
 (0)