Home

Handy Power Apps User Defined Functions
- Details
- Written by: Dustin Rocksvold
- Category: Power Apps
- Hits: 235
Mathematical calculations
udfMultiplyNumbers(Number1:Number, Number2:Number):Number = Number1 * Number2;
udfDivideNumbers(Number1:Number, Number2:Number):Number = Number1 / Number2;
udfAddNumbers(Number1:Number, Number2:Number):Number = Number1 + Number2;
udfSubtractNumbers(Number1:Number, Number2:Number):Number = Number1 - Number2;
udfCalculateVolumeOfCube(Length:Number, Width:Number, Height:Number):Number = Length * Width * Height;
udfCalculateVolumeOfSphere(PI:Number, Radius:Number):Number = 4 / 3 *PI * Radius ^ 3
udfCalculateAreaOfCircle(Radius:Number,PI:Number):Number = PI * Radius ^ 2
Water Calculations
Working as a hydro operator requires controlling the flow and storage of large volumes of water by monitoring and adjusting the amount of water travelling in water conveyances or passing through a hydraulic turbine to generate electricity.
I thought it would be handy to have functions to caluclate the flow and storage values.
Typical units of flow meaurement include cubic feet per second (CFS), Acre-Feet per day (ACFT/Day).
The typical unit of storage we use is Acre-Feet (ACFT).
There are several formulas to convert from flow to storage and vice-versa. I have created functions to allow the calculations to be made. They are outlined below:

Power Automate Workflow to Delete SharePoint Sites
- Details
- Written by: Dustin Rocksvold
- Category: Power Automate
- Hits: 579
So, this one took me a while to figure out. None of the links I found while searching actually worked. Then while reading Microsoft Graph API The Power Platform on SharePains.com I saw a link to a YouTube video Pieter had embedded in the page. In the video, Deepak dropped a URI for the API call that saved my bacon, "_api/site/id". It was the missing link for me.
Instructions for creating a Power Automate workflow to Delete SharePoint Sites
- Create a new flow
- Use the When Power Apps calls a flow (V2) trigger
- Create one text parameter for the URL of the site to delete.
- Add a Send an HTTP request to SharePoint step
- In the site address pass the URL from Power Apps
- Method = GET
- URI = _api/site/id
- Headers = Accept application/json
- Add a terminate step and set its status to Cancelled.
- Test the flow.
Read more: Power Automate Workflow to Delete SharePoint Sites

Power Automate Workflow to Create SharePoint Lists from a Power Apps Collection
- Details
- Written by: Dustin Rocksvold
- Category: Power Automate
- Hits: 503
Instructions for creating a Power Automate workflow to Create SharePoint Lists From a Power Apps Collection
- Create a new flow
- Use the When Power Apps calls a flow (V2) trigger
- Create two text parameters.
- One for the collection of lists to create
- One for the root URL of the SharePoint site you want to create.
- Add a Parse JSON step
- In the content place the lists to create parameter name you created in the trigger
- In the Schema, paste the following directly into the Schema window (not using the sample payload link)
Read more: Power Automate Workflow to Create SharePoint Lists from a Power Apps Collection

Power Automate Workflow to Create SharePoint Fields From a Power Apps Collection
- Details
- Written by: Dustin Rocksvold
- Category: Power Automate
- Hits: 364
Instructions for creating a Power Automate workflow to Create SharePoint Fields from a Power Apps Collection
- Create a new flow
- Use the When Power Apps calls a flow (V2) trigger
- Create two text parameters.
- One for the collection of fields to create
- One for the root URL of the SharePoint site you want to create.
- Add a Parse JSON step
- In the content place the fields to create parameter name you created in the trigger
- In the Schema, paste the following directly into the Schema window (not using the sample payload link)
Read more: Power Automate Workflow to Create SharePoint Fields From a Power Apps Collection