Posts

Showing posts from November, 2025

Business Rules (Model-Driven Apps & Dataverse)

Image
Business Rules in Microsoft Dataverse Business Rules allow you to define logic, validations, and UI behavior on Dataverse table forms without writing code. They work mainly inside model-driven app forms and partially in server-side operations depending on the scope. 1. Scope of Business Rules Entity – Applies to all forms of the table and also runs server-side when the record is created or updated by API/flows. All Forms – Applies to every model-driven form associated with the table. Specific Form – Applies only to the selected form. Note: Canvas apps require the rule to be set at table (Entity) scope, but Canvas apps support only limited actions. 2. Components of a Business Rule Condition – Evaluates field values or expressions. Set Field Value – Automatically fills or changes a field value. Clear Field Value – Removes existing values. Set Business Required – Makes a field Required, Optional, or Recommended. Set Visibility – Shows or...

Dataverse: Alternate Keys, Change Tracking, and Auditing

Image
Dataverse: Alternate Keys, Change Tracking, and Auditing 1. Alternate Keys What are Alternate Keys? Every Dataverse row has a system-generated primary key ( GUID ). An alternate key is a user-defined unique identifier built from one or more columns (for example, Account Number or Account Code + Region ). It lets Dataverse uniquely identify records using business-friendly values instead of GUIDs. When should you use Alternate Keys? Data integration – External systems don’t store Dataverse GUIDs but have their own IDs. Upsert operations – To update-or-insert (UPSERT) records using a natural key like AccountNumber . Uniqueness enforcement – Prevent duplicates at database level. Lookups without GUID – Power Automate / API can reference records by alternate key instead of GUID. How to create an Alternate Key (Maker Portal) Open make.powerapps.com and...

Power Automate Desktop : Get First Working Day of the Next Month

Image
Get First Working Day of the Next Month This flow gets the current date and time and calculates the first working day of the following month. If the first day of the month falls on a Saturday or Sunday, the flow automatically selects Monday as the first working day. Step-by-Step Explanation Get the current date and time The flow starts by retrieving the current date and time and storing it in the variable Now . Add one month to the current date The flow adds one month to Now and stores the result in Nowplus1 . This step ensures we are working with the next month. Create the first day of next month The flow constructs a text value using: %Nowplus1.Month%/01/%Nowplus1.Year% This represents the 1st day of the upcoming month. It then converts this text into a DateTime variable called FirstDayOfNextMonth . Check the day of the week A mess...

Calculate Your Age in Days - Power Automate Desktop Flow

Image
Calculate Your Age in Days - Power Automate Desktop Flow This flow asks the user to select their birth date and then calculates how many days they have lived so far. Finally, it shows the result in a motivational message. Step-by-Step Explanation Show flow description The flow begins by displaying a message box explaining what the automation does: it will ask for your birth date and compute your age in total number of days. Prompt user to select their birth date A date selection dialog appears where the user picks their birthday. The selected date is saved in the variable BirthDate . Get the current date The flow retrieves today’s date (without time) and stores it in CurrentDate . Calculate the difference in days Using the DateTime.Subtract action, the flow subtracts the birth date from today's date. The result—total days alive—is stored i...

Power Automate Desktop - Date & Time Handling Flow

🔄 Power Automate Desktop - Date & Time Handling Flow This flow demonstrates how to work with date and time values in Power Automate Desktop. It shows multiple formatting methods for both date and time, using standard formats and custom formats. It also includes converting formatted text back into a DateTime value. Step-by-Step Explanation Get Current Date and Time The flow begins by retrieving the current system date and time using the action Get Current Date and Time , and stores it in the variable CurrentDateTime . Convert Date to Short Date Format (M/d/yyyy) The flow converts CurrentDateTime into short date format using a standard formatter. A message box displays the formatted date to the user. Convert Time to Short Time Format (h:mm tt) The time component of the same DateTime value is formatted into short time format, such as 2:54 PM , and displayed to the...

Retrieve Metadata of a Web Page using Power Automate Desktop

Retrieve Metadata of a Web Page using Power Automate Desktop This Power Automate Desktop flow allows the user to enter a website URL and automatically retrieves important metadata such as the page title, meta keywords, description, and the full HTML source. It uses browser automation to open the page, extract information, and optionally save the source code to a file. Step-by-step Explanation Ask the user for a website URL The flow begins with an input dialog that prompts the user to enter the website address. The entered URL is stored in the variable URL . If the user clicks Cancel , the remaining steps do not execute. Open the website in Microsoft Edge If the user clicks OK, the flow launches Edge and opens the provided webpage. The browser window is maximized, and a retry mechanism is added in case the page fails to load on the first attempt. ⚠️ The Power Automate browser extension must be inst...

Take Screenshot of a Website using Power Automate Desktop

Take Screenshot of a Website using Power Automate Desktop This Power Automate Desktop flow asks the user for a website URL, opens it in Microsoft Edge, takes a screenshot, saves it to the Pictures folder, renames the file with the current date and time, and finally shows the file location in a message box. Step-by-step explanation Ask the user for the website URL The flow starts with a Display input dialog action that shows a popup window titled “Take screenshot of a website” . The dialog asks: " Please provide the website address to take screenshot of.." A default URL is pre-filled: https://mspowerplatformtips.blogspot.com/ The user types or changes the URL and clicks OK or Cancel . The entered URL is stored in the variable URL , and the button clicked is stored in ButtonPressed . Check if the user canc...

Access Team via Subgrid vs Manual Access Team in Dataverse

Access Team via Subgrid vs Manual Access Team in Dataverse In Dataverse, the term Access Team is used in two different ways, which often confuses makers: Access Team (Template + Subgrid)  - system-generated team created per record. Access Team (Team Type = Access)  - manual team created from Teams and used with the Share button. 1️⃣ Access Team via Subgrid + Template (System-Generated) This type of Access Team is created when you configure an Access Team Template and add a User subgrid on the form. How it works: You create an Access Team Template for a table (for example: UserOwned ). You add a subgrid to the main form and set: Table = Users (systemuser) View = Associated Member View Team Template = Your Access Team Template On each record, you add users to this subgrid. Dataverse automatically creates a hidden access team for that record and shares the r...

Understanding and Configuring Access Teams(Template) in Dataverse

Image
Understanding and Configuring Access Teams(Template) in Dataverse Access Teams in Dataverse allow you to share a specific record with selected users without giving them full table access. This is useful for applying record-level security .   1. Enable Access Teams for the Table First, open your table and turn on the Access Teams setting. This allows the table to use record-level sharing through Access Team Templates. 2.   Enable Access Teams in the Environment Go to Power Platform Admin Center Select your environment Navigate to Settings Open Templates Select Access Team Templates 3. Create an Access Team Template In the Access Team Template form: Enter a Name Select the Table Name (Example: UserOwned ) Save and close 4. Add the Team Template to Your Solution (Important) This is required to use the template inside the form designer. Open your Solution Click Add Existing Click More Select Team Template Choose the ...

Power Automate Desktop - Consolidated Excel Automation (Complete Flow Explanation)

Image
Power Automate Desktop - Consolidated Excel Automation (Complete Flow Explanation) This desktop flow consolidates multiple Excel files into one master Excel file and emails the final report to a chosen recipient. The flow consists of three major blocks: User Input Collection , Main Consolidation Loop , and Read & Write Subflow . Below is the clear explanation of each block. 🔹 Block 1 - Main Flow Controller This block initializes the flow, prepares the environment, loops through all Excel files, consolidates the content, and finally sends the output by email. Create New List : A blank list variable is created to store Excel file paths. Get Excel Files Details : A subflow populates the list based on user input. Get Documents Folder Path : Determines where the consolidated report will be saved. Launch Master Excel : Opens a blank Excel instance that acts a...

Power Automate Desktop - Excel Find & Replace Automation

Image
Power Automate Desktop - Excel Find & Replace Automation This desktop flow allows the user to select an Excel file and perform a Find & Replace operation on the contents of the worksheet. The user can choose whether to replace all occurrences of a value or only the first occurrence . 1. Display Custom Form The flow begins by opening a custom Adaptive Card form. The form contains fields where the user can: Enter the text to find Enter the replacement text Select an Excel file ( xls , xlsx , csv ) Choose the replace mode: Find & replace all or Find & replace first 2. Check for Cancel If the user presses Cancel , the flow stops immediately. Otherwise, it continues with the replacement process. 3. Launch Excel The selected Excel file is opened in editable mode using the Launch Excel Under Existing Process action. This ensures the file is opened inside a...

Power Automate Desktop - Excel Automation Explanation

Image
📄 Power Automate Desktop - Excel Automation Explanation This PAD flow allows the user to select an Excel file, extract all table values automatically, and display them in a popup message. Below is the detailed step-by-step process: 1️⃣ Select Excel File A file dialog appears prompting the user to select an Excel file ( *.xls* ). If the user clicks Cancel , the flow stops. 2️⃣ Launch Excel The flow launches the selected Excel file in visible and editable mode. Error handling ensures the file opens correctly. 3️⃣ Detect Data Range PAD automatically determines the first free row and first free column in the Excel sheet. This allows the flow to dynamically calculate the exact data range. 4️⃣ Read Data Using the detected boundaries, PAD reads the entire data table starting from column A row 1 , up to the last used row and column. The extrac...

Dataverse - Formula Type Column

Image
📌 Dataverse - Formula Type Column A Formula Type Column in Dataverse allows makers to write Power Fx formulas to compute values automatically. Once saved, Dataverse recalculates the result whenever referenced fields change. ✔️ Supported Power Fx Functions (from official docs) Formula columns support a subset of Power Fx functions: Math Operators: +, -, *, /, %, ^ Logical Operators: And(), Or(), Not(), !, =, >, <, >=, <= String Operators: & (concatenate), in, exactin Text Functions: Upper(), Lower(), Trim(), Left(), Right(), Mid(), Concatenate() Date & Time: Today(), Now(), Year(), Month(), Day(), Hour(), Minute() Logic & Conditions: If(), Switch(), Coalesce(), IsBlank() Conversion: Value(), Text() (with limitations) Record references: LookupColumn.Field (simple parent lookups only) ❗ Not Supported: Fi...

Rollup Column in Dataverse

Image
📘 What is a Rollup Column in Dataverse? A Rollup Column in Dataverse is a special type of column that automatically calculates aggregated values from related child records or from a hierarchical relationship within the same table. It uses background system jobs to compute values and does not update immediately on the form. 🟢 What Rollup Columns Can Calculate SUM  - Total of related values COUNT  - Number of related records MIN / MAX  - Lowest or highest value AVG  - Average of related records Latest Date  - Most recent related activity 🟡 Important Characteristics Calculates using asynchronous jobs (not real-time) Refreshes every 1 hour or when manually recalculated Supports only numeric & date data types Requires a related child table or self-hierarchy lookup 🛠️ How to Create a ...