Advertisements

Archive

Posts Tagged ‘PowerApp’

PowerApps – Create an ‘Account’ in Dynamics 365 from App using Flow

If you are new to PowerApps, please go through my previous blog

In this post, lets build an App with an Account Form and create the record in Dynamics 365.

PA_Flow_5

Prerequisite:

  • You must have a PowerApps account. Refer blog for details.
  • Create a Microsoft Flow with logic to create an Account record in Dynamics 365
  • Build an App and trigger Flow

Steps to create Flow:

  • Login to PowerApps Portal
  • Navigate to Business Logic -> Flows -> Create from blank

PA_Flow_1

  • In the new Flow screen, Choose Action, select ‘Dynamics 365’

PA_Flow_7

  • Select ‘Create a new record’ from Actions.
  • Now we need to put place holders in the fields which we pass data from PowerApp.
  • To add a place holder to ‘Account Name’ field, select the field, in ‘Dynamics content’ window, click on ‘Ask in PowerApps‘ button.
    • A new place holder will get added to ‘Account Name’ field.

PA_Flow_2

  • I repeated the above step for ‘Main Phone’ and ‘Description’ fields.

PA_Flow_3

  • Rename the Flow to CreateAccount and Save

Invoke Flow from PowerApp:

  • To know, how to create a new App and add controls to form, refer my earlier blog
  • To trigger the Flow, select the ‘Create’ button, go to ‘Action -> Flows’
  • From the ‘Data’ window, select the flow created in above section (i.e.,CreateAccount)

PA_Flow_4

  • On ‘OnSelect’ event of button, trigger the Flow ‘CreateAccount’ by calling ‘Run’ method and passing the 3 placeholder parameters.
    • CreateAccount.Run(txtName.Text,txtDesc.Text,txtMobile.Text)
  • Thats it, now its time to test the App

Test the App:

  • Press F5
  • Set the values and click ‘Create’

PA_Flow_5

  • Open the D365 App and you should see new ‘Account’ record.

PA_Flow_6

Refer my earlier article to build an App using Excel as Data Source.

🙂

Advertisements

PowerApps – Error while connecting to Excel Data Source

If you are new to PowerApps, please go through my previous blog

In my last Post building, I explained the steps to build an App using Excel file as Data Source.

While I was exploring more with that App, I encountered an error when playing with different excel files.

PA_Excel9

Reason & Fix:

  • If you have formulas defined in the Excel file, PowerApp will throw error as the PowerApps are not supporting Excel containing Formulas at this point.
  • Fix was, I had to delete Formulas and keep only data in the excel file to run the App.

🙂

Categories: PowerApps Tags: , , ,

PowerApps – Build an App using Excel data as Source

August 13, 2018 2 comments

If you are new to PowerApps, please go through my previous blog

In this post, I am going to walk you through building an App using Excel as ‘Data Source’.

I am going to build an App by

  • Prepare an Excel file with data formatted as ‘Table’
  • Place it in ‘One Drive For Business’.

Pre-requisites:

  • You must have a PowerApps account. Refer blog for details.
  • An Excel sheet with data formatted as ‘Table’.
  • ‘One Drive For Business’ account
    • This comes free with Dynamics 365 30 days trail.

Steps to configure Excel:

  • Create an Excel file with some data. I prepared ‘Customer’ records with 4 columns.
  • You should format this data as ‘Table’ as the PowerApp, only consider Tables, which you will notice in next sections.

PA_Excel1

  • Provide name to the Table; We will use this Table name in ‘Power App’. I named my table as ‘Customers‘.

PA_Excel2

  • Save the Excel

Steps to upload Excel to OneDrive:

PA_Excel3

  • Connect to ‘OneDrive’ and upload the Excel File

PA_Excel4

Steps to create App:

  • Login to PowerApps Portal
  • Create a New App with ‘OneDrive for Business’ template, as I uploaded the Excel to OneDrive.

PA_Excel5

  • Note: Its not necessary that you should pick ‘OneDrive for Business’ template, you can even create a ‘Blank app’ and create ‘OneDrive’ connection.
  • Click ‘Create’ to establish App’s connection with ‘OneDrive For Business’.

PA_Excel6

  • Choose the Excel file

PA_Excel7

  • Select the ‘Table’ and click ‘Connect’; This table ‘Customers‘ is nothing but the table name we given in ‘Excel sheet’.

PA_Excel8

  • Now you would experience the power of ‘Power Apps’ as it instantly come up with UI using the excel data. App auto create 3 screens for Browse Screen,Details Screen and Edit Screen.

PA_Excel10

  • You can reorder the columns by selecting ‘Data’ or you can change the ‘Sort Column’ if you want.
  • Finally, press F5 to run the App.

PA_Excel11.PNG

Refer my previous blog to build a simple calculator App.

🙂

 

PowerApps – Step By Step – Build a simple Calculator App

August 12, 2018 3 comments

In my previous article I detailed the steps to get started with PowerApps by signing up to the PowerApps portal.

Now, let me walk you through the steps to create and publish a simple ‘Calculator’ App.

The Calculator App will have 2 Text boxes and an ‘Operation’ dropdown. Upon clicking the ‘Calculate’ button, based on the Operation we either Sum or Subtract the values and show the result.

Calc

Pre-requisites:

  • You must have PowerApps account. Refer my previous article

Steps to build ‘Calculator’ App UI:

  • Connect to the PowerApp studio and click on ‘New App’ of Mode ‘Canvas’
  • From the ribbon, click on ‘Insert’ tab and drag & drop the controls on to the Canvas
  • For the ‘Text Input’ controls, select ‘Format’ as ‘Number’ so that it only allow digits.

Calc_1

  • Add the ‘Dropdown’ control to the Screen
  • Calc_ddl
    • To add “Sum”,”Substract” as options to the ‘Dropdown’, select ‘Items‘ property and set [“Sum”,”Substract”]
  • Add the ‘Button’ control to the screen and set the text as “Calculate”
  • Add 3 labels
    • Label ‘A’, Label ‘B’ and Label ‘Result’

Steps to add the business logic:

  • On buttons ‘OnSelect’ event,
  • Calc_resultbutton
    • Declare a variable “varResult”
    • Read the selected operation (i.e., Sum/Subtract) from the Dropdown
    • Write an If/Else statement
      • Add TextA, TextB; if the dropdown values is ‘Sum’ If(ddlOperation.Selected.Value=”Sum”,txtA.Text+txtB.Text))
      • Subtract TextA, TextB; if the dropdown values is ‘Substract’ If(ddlOperation.Selected.Value=”Substract”,txtA.TexttxtB.Text))
      • Set the Sum/Subtract value to the “varResult” variable using ‘Set‘ method
    • Finally, we should display the result by setting it to ‘Result’ label. So, set ‘Text’ as ‘varResult’

Calc_resultlabel

Time to Test the App:

  • Press F5 to test the App

PAPP_5

Save and Publish the App:

Once you done with testing, its time to Save and Publish the App.

  • To save the App, either press (Ctrl+S) or go to File -> Save

Calc_Save

  • Choose either ‘The Cloud’ option or ‘This computer’
    • ‘Cloud’ option would save the App in your ‘PowerApps’ account
    • ‘Computer’ option would provide the App in .zip folder to save locally.
  • Post save, to make the App available to Users, click on ‘Publish’

Calc_Publish

Notes:

  • PowerApps provides excel like formulas to apply business rules. Refer this blog to get exhaustive list of formulas.

🙂

 

Categories: CRM, PowerApps Tags: , ,

PowerApps – Getting started

August 12, 2018 4 comments

PowerApp is a service from Microsoft Business Application Platform (BAP) for creating business applications that can run in a browser or on a phone or tablet, and no coding experience is required.

Its a 3 step approach to create an App

  • Connect to a Data Source; It can be your Dynamics 365, Azure SQL/SQL On premise, API, etc…
  • Build the UI forms and add business logic using Workflows (i.e., Microsoft Flow, Azure Functions etc..)
  • Publish the App

PAPP_Intro

In this article, I am going to walk you through the steps to subscribe to Microsoft PowerApps and getting started with your first App.

Steps to connect to PowerApp Studio:

PAPP_SignIn

  • Click ‘Sign up free’ if you don’t have account already
    • Note: You can sign in with your 30 days trail account, if you already have one.
  • Click ‘Sign In’ if you have an account
  • Once you login to the Portal
  • PAPP_1
    • Select ‘Apps’ from the Menu
    • Choose ‘Design Mode’
      • Canvas : This mode allows to create the app by dragging and dropping elements onto a canvas, just as you would design a slide in PowerPoint. This mode is apt if your requirement is to build a custom forms with rich UI.
      • Model-drivenModel-driven app design is a component-focused approach to app development. Example of this mode is creating ‘Apps’ in D365.
  • Click on ‘Create an App’ button

PAPP_1

  • Pick your App style
    • If you are beginner, go with Canvas ‘Tablet Layout’

PAPP_2

PowerApp IDE’s:

There are 2 ways to build the Apps

  • PowerApp Studio – Web : In this option, you can build and Publish the App from the browser.
  • PowerApp Studio – Desktop App: You can also download the PowerApp desktop application from Here

In the next article, lets see how to create a simple Calculator App.

🙂

 

Categories: PowerApps Tags: , ,

Dynamics 365 – PowerApps

November 20, 2016 Leave a comment

PowerApps is a service for building and using custom business apps that connect to your data and work across the web and mobile.

PowerApps enables power users in line of business roles to easily build and deploy business apps – without the time and expense of custom software development.

In this article, I am going to create a simple PowerApp which allows me to work with my Case records.

Step by step creating App:

  • Subscribe for 30 days trail of Office 365
  • After sign up, on the Home page, select “PowerApps”
Power-app-office-365

Power-app-office-365

  • It will take to ‘PowerApps’ home screen.
  • To create new App, click on “New app” and from the popup,
    • If you have machine running on Windows 8 or Windows 10, Choose “PowerApps Studio for Windows” which will take you to Store to download the App
    • Choose “PowerApps Studio for Web” to design in browser.
Create-new-app

Create-new-app

  • I chose “PowerApps Studio for Windows” and downloaded the “PowerApps” from Windows Store
Microsoft-store

Microsoft-store

  • After download, launch the “PowerApps” studio.
  • As we are creating App to work with CRM Cases, choose “Dynamics 365” as your Data Source
Connect to Dynamics 365

Connect to Dynamics 365

  • Choose the ‘Dataset’ as your Organization (Its “MS” for me)
  • Choose the ‘Table’ as “Cases” entity and click on “Connect”
Connect to Organization Data Set and Cases Table

Connect to Organization Data Set and Cases Table

  • Studio opens up the designer with default screens (i.e.,Browse, Details, Edit) for Case’s  records.
Layout screens

Layout screens

  • You can add/remove fields or icons on the screens or create a new screen.
  • Once the design completes, click “ File -> Save” to save the App
Save the App

Save the App

  • I saved the App as “My First App”

Run the App:

  • Go to PowerApps home screen and select the App to run.
My App

My First App

  • Click the App and it will run and pull the Cases from my Dynamics 365 organization.
My first app running

My first app running

Share the Power App:

  • Also, App can be shared across the Organization or to specific Users.
  • Select the App and click on ‘Share’ option
Share-the-app

Share-the-app

🙂

Categories: Dynamics 365 Tags: ,