Steps to Embed a HTML Page in a Model-Driven App Form

Image
 Step 1: Upload the HTML file as a Web Resource Open your solution, then click on + New and select Web Resource. Add your HTML code. Set the File Type to 'Webpage (HTML)', provide a Name and Display Name, then click Save. HTML CODE: <!DOCTYPE html> <html> <head>     <title>Account Info</title>     <meta charset="utf-8" />     <script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>     <style>         body {             font-family: "Segoe UI", sans-serif;             padding: 20px;         }     </style> </head> <body>     <h2>Account Information</h2>     <p> <strong>Record Id:</strong> <span id="id">Loading...</span><br/> <strong>Entity Name:</strong> <span...

Unleashing Power Apps with Your Local MSSQL Data

 

Step 1: Install LocalDB

Before proceeding, make sure LocalDB is installed on your computer. You can refer to the installation guide using this link.

Step 2: Install SQL Server Management Studio (SSMS)

Download and install SSMS by following this link.

Step 3: Open SSMS

Launch SQL Server Management Studio. You will see a window like the one shown below.

Then, click on Connect.


Step 4: Create a Database and Tables

After connecting to the server, create a new database and the required tables as shown in the image below.

To create a database:
  • Right-click on Databases in the Object Explorer
  • Select New Database
  • Provide a name and click OK
To create a table:
  • Expand your newly created database
  • Right-click on Tables
  • Select New Table, then define your columns and data types

Step 5: Install the On-Premises Data Gateway

To connect your local database with cloud services like Power BI or Power Apps, you need to install the On-Premises Data Gateway.

👉 Click on this link to download and follow the installation guide:
Install the on-premises data gateway

After installing, make sure to sign in with your work or school account and register the gateway.

A gateway acts as a bridge between on-premises data sources (like a local SQL Server) and Power Platform services (Power Apps, Power BI, Power Automate, etc.) in the cloud. It securely transfers data between your local network and Microsoft cloud services.


Types of Gateway Modes

1. Standard Mode (Enterprise)

  • Multi-user support: Multiple people can use the same gateway.

  • Used in production or enterprise environments.

  • Can be shared across multiple services (Power BI, Power Apps, Power Automate).

  • Can be clustered for high availability.

2. Personal Mode

  • Single-user only: Tied to the user who installed it.

  • Primarily used for Power BI only, not for Power Apps or Power Automate.

  • Best for individual or testing purposes.

Step 6: Configure the Gateway

After the installation is complete:

  1. Open the On-Premises Data Gateway application.

  2. Sign in using your Microsoft (work or school) account.

  3. During the initial setup, you will be prompted to:

    • Enter a gateway name

    • Set up recovery keys (make sure to save them securely)

Once the setup is complete, the gateway dashboard will appear as shown below:

The recovery key is important if you ever need to migrate or restore your gateway. Store it safely!

Step 7: Set Up PowerApps to Use LocalDB

Before using LocalDB in PowerApps, ensure the following are ready:

  • LocalDB is installed and running

  • Your database and tables are created

  • The On-Premises Data Gateway is installed and connected

Now, follow these steps in PowerApps:

  1. Open PowerApps Studio and create a blank app

  2. Click on "Add data" from the left panel

  3. Select SQL Server

  4. Choose "+ New connection"

From here, you'll be guided to enter your SQL Server details and connect via the gateway.

Make sure your gateway is online and signed in with the same account you're using in PowerApps.



Select Windows authentication in authentication type. Select on premise gateway option 


When prompted, enter the following details:

  • SQL Server Name

  • Database Name

  • Username and Password

Refer to the image below for the correct values:



Password – This is your Windows login password (i.e., the password you use to sign in to your desktop or laptop)


If your gateway doesn’t appear immediately:

  • Click Refresh

  • Select your gateway from the list

  • Click Connect

Step 8: Select Tables and Stored Procedures

Once connected to the SQL Server, you can now select the tables and stored procedures you want to use in PowerApps, as shown in the image below:


Step 9: Finalize the Connection

Select any table you want to work with and click Connect.

That’s it! You have successfully created a connection to your SQL Server database using PowerApps.


Step 10: Use SQL Server in Power Automate

To integrate your SQL Server data with Power Automate:

  1. Open Power Automate and create a blank flow (e.g., Automated, Instant, or Scheduled flow)

  2. Click on + New step

  3. Search for and select the SQL Server connector

  4. Choose the appropriate action (e.g., Get rows, Execute a stored procedure, etc.)

  5. Select the existing SQL Server connection you created earlier or create a new one if needed

Now you can start building workflows that interact with your SQL database!


Step 11: Using SQL Server Connection in Power Automate

Since you already created the SQL Server connection in PowerApps, the same connection will automatically be available in Power Automate.

When you add the SQL Server connector in your flow, simply select the existing connection from the dropdown menu—no need to create a new one.

You can then choose the tables, stored procedures, or actions to use as inputs directly from this connection.

Comments

Post a Comment

Popular posts from this blog

Step-by-Step Guide: Power Automate Custom Connector Using Graph API from Azure App Service

Step-by-Step: Give Unique Permissions to OneDrive Files Using Power Automate and Graph API (No Premium License Needed)