Category: PowerApps

Everything You Need to Know About Embedded Canvas Apps

Hello Readers

Hope you are all well!

It’s been a while since I last wrote, I got super busy with my community events and the new work life.

I will try to be as regular as possible on my posts.

Today, I am sharing everything I know about using an embedded canvas app in Dynamics 365 and Model Driven Apps; this will be more of a guide.

How many apps can I embed on a form?

Three canvas apps at a time, per form on web and one for Phone or Tablet.

Is there a workaround to use more than three apps on the web for?

Yes, use a webresource with your app URL and adjust the height and width. You might need to pass a parameter in your app depending on what the app is for. (Not the best result but a workaround)

What do I need to consider if it’s the first canvas app of my organisation?

If this is your first app, you might want to cross check security roles of users who’re going to use this app within Dynamics 365 as you need to provide additional privileges, assuming you’ve been using Dynamics 365 already. The privilege is called ‘Canvas App’, minimum read privileges will be required.

Is there something specific I would need to communicate to the users on the launch day?

  • Users will see a sign in screen first time and must sign in.
  • Users will need allow access.
  • Session will timeout in case of inactivity and users will be required to sign in again.

How to share an embedded canvas app?

In the maker portal, click the ellipses to share the app. You can share the app to everyone or specific users. The easiest way to share with a group of users (if you don’t have a security group) is export users to excel and transpose to a row with comma separated aliases. This is not the fastest way if you want to share with a small number of users like 3-5 but 50-100.

Special control ModelDrivenFormIntegration and related actions

NameDescriptionExample
ItemAccess the record on which you embed the appModelDrivenFormIntegration.Item.InvoiceID
SaveFormSaves the record on which you embed the appModelDrivenFormIntegration.SaveForm()
OpenQuickCreateFormOpens a quick create form of the table specified (default form in case you have more than one quick createModelDrivenFormIntegration.OpenQuickCreateForm(Contacts)
RefreshFormRefreshes the record on which you embed the appModelDrivenFormIntegration.RefreshForm(true)
ModelDrivenFormIntegration.RefreshForm(false)
**true or false is for the pop up message of unsaved changes on the model driven form
NavigateToViewNavigates user to a view of the specified tableModelDrivenFormIntegration.NavigateToView(Accounts, ‘Active Accounts’)
NavigateToMainFormNavigates user to a form of the specified tableModelDrivenFormIntegration.NavigateToMainForm(Contacts, ‘Unified Interface Contact Form’, ‘GUID’)

**Opening ‘Modal Dialog’ form via ModelDrivenFormIntegration is not possible at this stage.

Enable or Disable an embedded canvas app

On the field properties control tab👇

Why can’t I see my embedded canvas app?

Make sure you’ve the following things in place:

  • You’ve the right license.
  • You’ve the right privilege in your security role.
  • You’ve enabled third party cookies and local data.

I am a system administrator but cannot see my embedded canvas app

It will not appear until you first save the form meaning if the record is not created then you will only see a blank space.

How can I get related data in embedded canvas app?

On most forms in Dynamics 365 and Model Driven apps you will at least have one look up field. And to be able to get data out of it, you cannot use the special control directly i.e. ModelDrivenFormIntegration.Item.PriceLists.Name would not given you any result but error. Instead use, LookUp(Invoices, Invoice = ModelDrivenFormIntegration.Invoice).’PriceList’.’Name’

Quick Tip

Try and use a required field to link/embed the app to. If not, try auto-populating default data via a business rule or JS because if your field is blank then your app will not refresh in context of any data changes on the form where the canvas app is embedded.

That’s all I have to share. I will try and keep adding to the list. If I have missed on something, please comment and I will add it to the list.

Hope it helps!

Plot Multiple Map Points In Power Apps (Canvas Apps) with Dynamic Filters

Hi Everyone

In this vlog we will see how to see multiple points/pushpins on a map in canvas app. As always, this is a no code solution and fairly basic.

I have came across this requirement so many times in Dynamics 365 for e.g. show all customers on a map or contacts on a map or even appointments on a map. Many solutions are available for Dynamics 365 CE including add ons like Maplytics. But for canvas app, following issues persists:

  • No map components
  • Static bing/google maps can be inserted by inserting an image and then providing URL
  • Bing or Google maps API is required
  • Hard code latitude and longitude
  • If you want to show more than one push pin, you need to hard code all coordinates
  • You can’t apply dynamic filters on your maps

To me all of the above are not easy to use solution and that’s why I decided to look for something which all our #nocodemonkeys can use. This can be the fastest way you can plot all your customers on a map within canvas apps.

Prerequisites:

  • Access to Power Apps
  • Access to Power BI (Desktop and Web)
  • Super Basic Knowledge of how to create a chart/report in Power BI
  • Basic understanding of Power Apps formulas
  • Entity (accounts/contacts/appointments) must have Latitude and Longitude filled (otherwise it won’t be shown on maps

Note: You can get latitude and longitude by create a flow in Power Automate

Step 1-7 for Power BI and Step 8-12 Power Apps

Step 1: Go to your Power BI Desktop>>Create a connection>>Get data (e.g. Accounts)

Step 2: Once your data is loaded>>click on report icon and then add the visualisation type as shown below:

Step 3: Add data fields

Step 4: Save your Power BI report by clicking on the disk button on top left

Step 5: Login to Power BI web https://app.powerbi.com/

Step 6: Click on ‘Workspace’ in the left navigation and then click reports (this is where you can find the report you created in above steps)

Step 7: Click on the report to open and then click pin visual

Step 8: Login to Power Apps https://make.powerapps.com/ and pick your existing app or create a new canvas app

Step 9: Click Insert then ‘Power BI tile’

Step 10: Select Workspace, Dashboard and Tile

Dynamic Filtering- Step 11 & 12

Step 11: Apply dynamic filtering by adding new components like Text Input or Drop Downs. In my case, I have two drop downs and one text input; names below:

StateDropDown- With 5 values (you can have any values here)

CityDropDown-With 5 values (you can have any values here)

txtPostCode- Text input for ZIP/Postal Code

Step 12: Update the ‘TileURL’ of Power BI tile. Use the following sub-steps based on how many filters you need as it can go to Nth level (I am only showing three)

12a. One field filter

“Power BI TileURL” & If(!IsBlank(txtPostCode.Text),
“&$filter=accounts/address1_postalcode eq ‘” & txtPostCode.Text & “‘”)

12b. Two fields filter

“Power BI TileURL” & If(!IsBlank(txtPostCode.Text),
“&$filter=accounts/address1_postalcode eq ‘” & txtPostCode.Text & “‘”,
!IsBlank(CityDropdown.SelectedText.Value),
“&$filter=accounts/address1_city eq ‘” & CityDropdown.SelectedText.Value & “‘”)

12c. Three fields filter

https://app.powerbi.com/embed?dashboardId=ed06a838-8b0f-4445-a582-1890699df2d3&tileId=401efbc1-2194-4807-a07e-7e89567e49ce&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly9XQUJJLUFVU1RSQUxJQS1FQVNULUEtUFJJTUFSWS1yZWRpcmVjdC5hbmFseXNpcy53aW5kb3dzLm5ldCJ9” & If(
!IsBlank(txtPostCode.Text),
“&$filter=accounts/address1_postalcode eq ‘” & txtPostCode.Text & “‘”,
!IsBlank(CityDropdown.SelectedText.Value),
“&$filter=accounts/address1_city eq ‘” & CityDropdown.SelectedText.Value & “‘”,
!IsBlank(StateDropdown.SelectedText.Value),
“&$filter=accounts/address1_stateorprovince eq ‘” & StateDropdown.SelectedText.Value & “‘”
)

Note: Screenshot below for better understanding

Result after dynamic filters

Video here:

Hope it helps!

Subscribe to my channel and follow my blog.

Thanks!

Let’s keep sharing!

Sharing my MVP Award with you!

Hi Everyone

A huge thank you to all for supporting me by watching my videos, subscribing to my channel and blog. it couldn’t have been possible without your support and that’s why I decided to share my MVP award with you by unboxing it together.

I received the notification of my award via email on 1st Jan 2020 and I received the actual award kit itself on 20th Jan 2020. Since I wanted to unbox it together with you, I thought I will wait until I can make a video. It was hard to see the box but not be able to open it but I was happy that I am sharing it with you guys.

I shared the news on Linkedin and received 35000+ views on my post and that’s just amazing for me. Follow me on linkedin, twitter and if you’ve not subscribed to my channel, do it now. 🙂

Unboxing video here:

Subscribe to my channel and follow my blog.

Thanks!

Let’s keep sharing!

Using Timer Control In PowerApps (with problem scenarios and Business use cases)

Hello Readers and Viewers

This blog/video is part of my quick tip series. We are going to look at how we can force a screen to be visible to a user irrespective of the transition, in other words delay screen transition.

Skip to the video, if you don’t want to read

Example Problem 1: if we want to Navigate to more than one screen back to back only the last screen mentioned in navigate formula is visible to the user; that means one navigate screen is skipped. for e.g. look at the formula below:

Select(Parent);SubmitForm(checkinform_1);ResetForm(checkinform_1);Navigate(Success,ScreenTransition.Fade);Navigate(lstMembers)

If you apply the above formula to your Power Apps, users will always end up seeing “Navigate(lstMembers)” and the success screen is skipped.

Example Problem 2: if we remove the last bit of the formula and have only one ‘navigate’ as shown below:

Select(Parent);SubmitForm(checkinform_1);ResetForm(checkinform_1);Navigate(Success,ScreenTransition.Fade)

if you apply the above formula, users will have to touch on the success screen somewhere to be able to see any other screen. (assuming success button in below screen will have navigate formula)

b1

Solution to both the example problems: First of all remove the last navigate from the formula and only have one navigate, shown below:

Select(Parent);SubmitForm(checkinform_1);ResetForm(checkinform_1);Navigate(Success,ScreenTransition.Fade)

Note: I am not saying you must use the exact same formula as above, you need to change the formula as per your need but only have one navigate in the formula.

Now on your success screen add a timer by going to Insert>>Input>>Timer

b2.JPG

Set AutoStart to true

Set the duration of the timer by clicking on the timer on screen (Completely on your requirements, for how long you want a user to see a screen)

1000=1 second 5000=5 seconds 30000=30 seconds

Set OnSelect to false

b3b4b5

Set the second navigation on your ‘TimerEnd’ property

b6

Now hide the timer, so your users can’t see it

b7

And all done, your users will now be navigated to the screen of choice without having to click anywhere.

Business Use Case: You want your users to see a success screen for ‘n’ seconds and then auto-redirect to a list or another form.

Video here:

Let me know your thoughts!

Subscribe to my channel and follow my blog.

Thanks!

Let’s keep sharing!

The Master is here for the Brisbane PowerApps and Flow User Group

Hello QLDers

I am really excited to give you a heads-up that in next month’s User Group, we will have the master himself presenting.

Did you guess it yet? it’s Charles Sterling 🙂

Linkedin here

Twitter here

Following is what he’s going to talk about (Still in discussion):

  1. PowerApps AI Builder
  2. Integrating PowerApps and Power BI

For more details visit the power users website here.

We will publish the agenda and venue soon on ‘Brisbane PowerApps & Flow User Group‘ website and Meetup Group

Make sure to RSVP as soon as you can because seats would be limited.

If you’re not from QLD and visiting Brisbane towards the end of November 2019, make sure to join the group and let us know if you’re interested in attending.

Thanks for your attention.

Let’s keep sharing!

Mocking Up Genius Bar’s Create Your Style App with PowerApps

Hi Readers and Viewers

This is a short video where I am trying to mockup genius bar’s ‘Create your style’ app/feature. This can help you if you sell product bundles which work together as a bundle only for e,g, tablet and keyboard.

Watch the video here:

Let me know your thoughts!

Subscribe to my channel and follow my blog.

Thanks!

Let’s keep sharing!

PowerApps for Business Users & Consultants: Episode 8- Infusing AI in your PowerApps

Hi Readers and Viewers

With this episode, I am concluding my ‘PowerApps for Business Users and Consultants’ series.

In this episode, we are going to look at using AI builder components in our PowerApps.

AI Builder currently has following components in preview:

  1. Business Card Reader
  2. Form Processor
  3. Text Classification
  4. Object Detection
  5. Prediction

We have focussed only on the following two and it’s business use cases:

  1. Business Card Reader
  2. Form Processor

Video here:

We have also talked about, what to do when your trial for AI expires:

Purchase/Extend

What error you see?

We have also talked about where to learn advanced PowerApps while I am thinking of my next series:

Shane Young’s Channel 

Brian Knight from Pragmatic

Thank you so much for all the love and support. I will be back with a new series soon.

Subscribe to my YT channel and follow my blog.

Hope it helps!

Let’s keep sharing!

PowerApps & Flow User Group App for Leaders, Hosts, Organisers and Coordinators

Hello Readers and Viewers

As User Group organisers, it becomes difficult for us to track the attendance of participants mostly due to the format of the meeting. In our last week’s UG we were prepared to break the ice and created an app to check in attendees.

Following is what you can do with the app:

  1. Register attendees as members
  2. Update member details
  3. Check In attendees
  4. Draw Raffle (if and when it’s available)

What can you get out of it:

  1. Track the attendance of your members
  2. If members are not regular, send them a survey for what they want to see
  3. Send them a FormsPro survey to get feedback
  4. Keep member details up to date
  5. Instead of drawing raffle the conventional way, use PowerApps

Screens:

Home

IMG_0279

Register Participant

IMG_0281

Update Details and Check In

IMG_0282

Note: Check In form is hidden, so members don’t have to fill in date, UG and their name again

Members List

IMG_0280

Draw Raffle

IMG_0283

Note: Shuffle formula and collection is used for Raffle draw

Data Source: OneDrive (Excel Web)

Tables used: Registered Members and Checked In Members to draw raffle

If you’re a User Group leader and want to use this app; you don’t really have to make any changes except for the connection and start using it. I have uploaded it on github. More instructions on there:

https://github.com/diyd365/UserGroupApp

Watch the youtube demo here:

Subscribe to my channel and follow my blog.

Thanks!

Let’s keep sharing!

 

 

PowerApps for Business Users & Consultants: Episode 7- Inserting MS Flow as an action in PowerApps

Hi Readers and Viewers

In this episode we will see, how to insert a flow in a PowerApp without having to connect the app with any data source. Some key points below:

  • No data source required for your PowerApp
  • Just create labels and Text inputs on the screen
  • Add a flow
  • Push data to your desired source like excel, sharepoint, D365, CDS

Video here:

Subscribe to my YT channel and follow my blog.

Hope it helps!

Let’s keep sharing!

Managing D365 Security Roles via PowerApps

Hi Readers and Viewers

In this video, we will look at D365 Users and security roles in Canvas App.

Following are some key features of the app:

  • See list of users
  • See list of security roles
  • Assign security role to a user
  • Check security role of a user
  • Go to D365 Advanced Settings from within PowerApps
  • Go to MS Flows from within PowerApps

Here’s the video:

Please subscribe to my YouTube Channel and follow my blog.

Hope it helps!