PowerApps-Samples
Sample code for Power Apps, including Dataverse, model-driven apps, canvas apps, Power Apps component framework, portals, and AI Builder.
Top Related Projects
Unsupported PowerApps Tools & Apps
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Quick Overview
Microsoft PowerApps-Samples is a GitHub repository containing sample applications and code snippets for Microsoft Power Apps. It provides developers and users with practical examples of how to build various types of applications using the Power Apps platform, demonstrating best practices and common patterns.
Pros
- Offers a wide range of real-world examples for different use cases
- Regularly updated with new samples and improvements
- Includes both canvas and model-driven app samples
- Provides a valuable learning resource for beginners and experienced developers
Cons
- Some samples may become outdated as the Power Apps platform evolves
- Limited documentation for some of the more complex samples
- May not cover all possible scenarios or advanced features
- Requires a Power Apps license to fully utilize and deploy the samples
Code Examples
Since PowerApps-Samples is a collection of sample applications rather than a code library, traditional code examples are not applicable. However, here are a few snippets from different samples to illustrate the types of code you might find:
- Canvas app formula example (from a button control):
UpdateContext({ShowPanel: true});
Navigate(EditScreen, ScreenTransition.None);
This code updates a context variable and navigates to an edit screen when a button is pressed.
- Power Apps Component Framework (PCF) TypeScript example:
public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement): void
{
this._context = context;
this._container = container;
this._notifyOutputChanged = notifyOutputChanged;
this._input = document.createElement("input");
this._input.setAttribute("type", "text");
this._input.addEventListener("input", this.onInputChange);
this._container.appendChild(this._input);
}
This code initializes a custom input control in a PCF component.
- Power Apps formula for data filtering:
Filter(Customers, StartsWith(CustomerName, TextInput1.Text))
This formula filters a collection of customers based on user input in a text box.
Getting Started
To get started with PowerApps-Samples:
- Clone the repository:
git clone https://github.com/microsoft/PowerApps-Samples.git
- Choose a sample app you want to explore
- Open Power Apps Studio (https://make.powerapps.com)
- Import the sample app or copy the relevant code snippets into your own app
- Customize and experiment with the sample to learn how it works
Note that you'll need a Power Apps license and appropriate permissions to create and publish apps in your environment.
Competitor Comparisons
Unsupported PowerApps Tools & Apps
Pros of powerapps-tools
- More diverse set of tools and utilities for Power Apps development
- Includes CLI tools for automation and deployment
- Offers solutions for specific scenarios like data integration and custom connectors
Cons of powerapps-tools
- Less focused on providing comprehensive sample applications
- May require more setup and configuration to use effectively
- Documentation can be more technical and less beginner-friendly
Code Comparison
PowerApps-Samples typically includes complete app examples:
Screen1 As screen:
Label1 As label:
Text: ="Hello, World!"
Button1 As button:
OnSelect: =Navigate(Screen2)
powerapps-tools often provides utility functions or scripts:
$connectionString = Get-PowerAppConnectionString -EnvironmentName $env -ConnectionName $conn
$apiDefinition = Get-PowerAppApiDefinition -ApiName $apiName -ConnectionString $connectionString
Summary
PowerApps-Samples focuses on providing complete, ready-to-use sample applications for learning and reference. It's ideal for beginners and those looking for quick examples of specific features or patterns.
powerapps-tools, on the other hand, offers a broader range of utilities and tools for more advanced Power Apps development scenarios. It's better suited for experienced developers looking to streamline their workflow, automate tasks, or tackle complex integration challenges.
The choice between the two repositories depends on your specific needs and level of expertise in Power Apps development.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Pros of Appsmith
- Open-source and self-hostable, offering greater flexibility and customization
- Supports a wider range of databases and APIs out-of-the-box
- Active community-driven development with frequent updates and contributions
Cons of Appsmith
- Steeper learning curve for non-developers compared to PowerApps
- Less integration with Microsoft ecosystem and Office 365 products
- May require more technical expertise for deployment and maintenance
Code Comparison
PowerApps-Samples (XML-based):
<control type="button" x:Name="Button1">
<text>Click me</text>
<OnSelect>
Set(varClicks, varClicks + 1);
</OnSelect>
</control>
Appsmith (JavaScript-based):
{
"widgetName": "Button1",
"buttonLabel": "Click me",
"onClick": "{{storeValue('clicks', appsmith.store.clicks + 1)}}"
}
Both repositories provide sample code and templates for building low-code applications. PowerApps-Samples focuses on Microsoft's PowerApps platform, offering examples tailored to the Microsoft ecosystem. Appsmith, being open-source, provides a more flexible approach with JavaScript-based widgets and support for various data sources. While PowerApps may be easier for beginners within the Microsoft environment, Appsmith offers more customization options for developers comfortable with JavaScript and diverse tech stacks.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Power Apps Samples
Welcome to the samples repo for Power Apps. The repo contains sample code for Power Apps, including Dataverse, model-driven apps, canvas apps, Power Apps component framework, portals, and AI Builder.
Resources
- Dataverse developer docs
- Model-driven apps developer docs
- Canvas apps developer docs
- Power Apps component framework docs
- Power Platform developer docs
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Top Related Projects
Unsupported PowerApps Tools & Apps
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot