PowerBI Online has a great feature within it that allows the users to create dashboard tiles just by asking questions, and this has always been a crowd pleaser to show to the users.

But if you have been using the PowerBI Desktop to create your reports then you have had to do this the hard way by manually selecting the fields.

Great news. There is a Preview feature that is now available within PowerBI Desktop that adds that same natural language query option that is available within PowerBI Online, but now it is within PowerBI Desktop.

In this article we will show you how to enable this feature and also how it works.
Read More

Advertisements

As a little background, I usually would set up all of my demo data within Operations, but now that we are in a connected world and I can send Account details from Sales to the Customer records in Operations, I have been trying to embrace the other side of Dynamics 365, because there are a few features that we on the Operations side can’t do.

So, today I was setting up some data today for a demo, and also testing the Sales to Operations integration and I discovered the Bing! Maps API and GeoCode feature in Sales and thought it was worth showing this small demo example.
Read More

Last week I saw something interesting in one of the presentations at Ignite. There is a new way to access all of the Data integration and environments for PowerApps.

How to do it

Just go to admin.businessplatform.microsoft.com.


It is the same as going to PowerApps, and then accessing it through the settings:


But, it may be a better portal if you just want to show the integration, and not meander through the PowerApps page.

The Data Management tools within Dynamics 365 for Operations open up a whole slew of different ways that you can get data into the system. And it also has an option to create batch import job that will allow us to watch for data.

This opens up a whole slew of options for us because we can use these batch jobs to import data from other systems, because they can just package the data up for us and then send us the data. It creates a very easy way to create integrations because these data packages can also be sent to the Data Management batch job through a web service interface.

Now if I were a coder, then I would just call the service from my other system and it would create the package and send it to Dynamics 365 for Operations, but there are also other options available to us.

But what if you want to have a system that you don’t control integrate with Dynamics 365 for Operations, or maybe you are getting files from a partner that you want to automatically upload into the system?

Then you can go a little old school and have it create a file based integration.

But if you do that, how do you get the file to be picked up and processed within the Data Management service?

The simplest answer is to use Flow to watch for the files and then grab them and send them to the Data Management service for you.

And if you are looking for somewhere to All you need is somewhere for the file to be put, and OneDrive is a great option.

In this walkthrough we will show you how to tie all of this together to create your very own file based integration,.

PowerApps and Flow are great, and there are a lot of standard connectors that we can use within our PowerApps and Flows. But sometimes we may want to do something just a little different where there is no connector out of the box.

This is when we may want to create a custom connector within PowerApps.

The next question is how do we write the function for the custom connector, and the answer to that is we can do it through Azure using Function Apps. These allow us to register a function service within Azure and then code our function online without even having to open up Visual Studio.

In this walkthrough we will step through how you can do this, and also introduce the Azure Function Apps to those of us that have never used them before.

Topics Covered

Creating an Azure Function App

Creating a Function within our Function App

Creating a Swagger definition for the Azure Function

Creating a custom PowerApp Connector to the Azure Function

Creating a new Connection to our Function App Connector

Using Azure Function Connector in a PowerApp Flow

Running the Flow

Creating an Azure Function App

The first step in this process is to create a new Function App within Azure that we will use to house our custom function that we will eventually register and consume within PowerApps.

To do this, open up the Microsoft Azure portal and click on the + button to add a new resource. Then type in Function App into the search box to find the Function App resource type and select it.


This will take you to the Function App creation form.

All we need to do here is click on the Create button.


This will take us to the Function App Create dialog where we will want to set up a few defaults for our Function App.


We will start off by giving our Function App and App name.

Here we set our App name to dicerollerapp.

Sometimes you may need to tinker with the App name a little to find a function name that is not already reserved within the azurewebsites.net domain, so if the name you choose is reserved, then just try different variations until you find one that works.


This will automatically default in values for the Resource Group and also the Storage account, and we will leave these as the default values.

To make the function easier to find, also check the Pin to dashboard option, and then click on the Create button to create our new Function App.


This will return us to our Azure dashboard and we will see that the Function app is being provisioned for us.

After the Function App is created, just click on the tile.


This will take us to the Function App
Overview form where we can start creating our functions.


Creating a Function within our Function App

Now that we have registered our Function App within Azure, we can start creating the function that we will want to perform within our PowerApp.

To do this, click on the Functions tab within the Function App explorer and then click on the + New function button.


This will open up a list of templates that we can choose from for our Function App.

For this example we will select the HttpTrigger – C# template.


This will show us some default details that we will can update for our Function App.


If we want we can change the Name of the function to something a little less generic.

Here we changed the Name to Roll and then clicked on the Create button.


This will create a new C# function for us with a little bit of code to help us along the way.


Rather than use the default code we will replace it with the following function.


using System.Net;

public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)

{

int randomNumber;

log.Info(“C# HTTP trigger function processed a request.”);

// parse query parameter

string die = req.GetQueryNameValuePairs()

.FirstOrDefault(q => string.Compare(q.Key, “die”, true) == 0)

.Value;

// Get request body

dynamic data = await req.Content.ReadAsAsync<object>();

// Set die to query string or body data

die = die ?? data?.die;

Random random = new Random();

if (die == “D10”){

randomNumber = random.Next(1,10);

} else if (die == “D8”) {

randomNumber = random.Next(1,8);

} else if (die == “D6”) {

randomNumber = random.Next(1,6);

} else if (die == “D4”) {

randomNumber = random.Next(1,4);

} else {

randomNumber = random.Next(1, 20);

}

return die == null

? req.CreateResponse(HttpStatusCode.BadRequest, “Please pass a Die code on the query string or in the request body”)

: req.CreateResponse(HttpStatusCode.OK, randomNumber);

}

To test the function, all we need to do is click on the Run button, which will compile the code and then try to perform the function.

Initially the function will fail, because our code has a parameter of die that we need to pass through to it, and if you look on the right hand side, within the Request body the function is passing a parameter of name.


If we change the parameter name to die, give it a value of D20 and then run the function then we will see in the Output area we will get a random number between 1 and 20.


Creating a Swagger definition for the Azure Function

Now that we have created our function we will need to create a Swagger definition for our Function app.

This is the definition that PowerApps will use to know where the Function App is and also what all of the parameters and returned values are for the function.

To do this we will just create a new text file and paste in the following code into it.


{

“swagger”: “2.0”,

“info”: {

“version”: “1.0.0”,

“title”: “DiceRollerApp2

},

“host”: “dicerollerapp.azurewebsites.net”,

“paths”: {

“/api/Roll“: {

“get”: {

“description”: “Calls my azure function over https”,

“operationId”: “RunThis”,

“parameters”: [

{

“name”: “code”,

“in”: “query”,

“description”: “code”,

“default”: “FIPSu1oqs1SJaurLPakKNGQaH9CHCEF7lvetzif7ZsriN1uJ8J88MA==“,

“type”: “string”

},

{


“name”: “die”,

“in”: “query”,

“required”: true,

“default”: “D20”,

“type”: “string”

}

],

“responses”: {

“200”: {

“description”: “Successful response”,

“schema”: {

“title”: “The response of the api.”,

“type”: “string”

}

}

}

}

}

}

}

There are a couple of changes that we need to make to this file though to make sure that it is pointing to our new Function App.

The first one is to update the title of the definition to match our function.

For this example we set the title to DiceRollerApp.


Then we will want to change the host URL to point to our Function App. This is the name that we initially gave out Function App when we created it.


Because we changed the name of the function within the Function App we will also want to update the path URL to reference the name of the function that we used.

For this example the path is /api/Roll.


Also because we changed the name of the parameter that we are passing to the function from name to die then we will also want to update the parameter definition to match that parameter.


There is one last change that we need to make to the Swagger definition, and that is to give it a Host key code that it will use to authenticate against the Function App.

To find this, return back to the Function App and click on the Settings tab in the header.

At the bottom of the form you will see that there are dome Host Keys.

Click on the Click to show link for the default host key.


This will show us the Host key code and we will want to copy the key.


Now return back to the Swagger definition and paste the Host key code into the default value for the code parameter.

After we have done that we can save the file.


Creating a custom PowerApp Connector to the Azure Function

Now that we have created our Swagger definition, we will want to create a new custom connector within PowerApps that calls the Azure Function.

To do this, open up PowerApps and then click on the Connections menu item.


This will open up the Connections form and we will want to click on the Manage custom connections button in the header.


When the Custom connections page is displayed, click on the Create custom connector link.


This will open up a definition form for our new Custom connector.


Now click on the folder icon for the Custom connectors and find the Swagger file that we just created and click on the Open button.


This will load in the default configuration for the Function App and also set all of the parameters for the connector.


We can add a custom icon for the connector if we like just by clicking on the Upload icon button and then selecting a picture.


For this icon we have a white background, so we will want to make the Icon background color match this and set it to the hex color for white which is #ffffff.


Finally we will give out connector a Description and then click on the Continue button.


This will take us to the Security tab and all we need to do here is click on the Continue button.


Now we will be taken to the Definition tab where we can add a little more detail to our connector.


Start off by adding a Summary for the connection.

Here we wet the Summary to Dice Roller.


And we also changed the Description to explain a little about what the connector does.

After we have done that we will want to click on the Create connector button in the header to create the connector with all of the definitions that we supplied.


After a few seconds we will get a notice that the connector was created and we can then click on the Test link to start testing the connector out.


Creating a new Connection to our Function App Connector

Now that we have created our Connector we will want to create a connection to it within PowerApps so that we can use it.

To do this, click on the + New connection button on the Test page.


This will open up a dialog box asking us if we really want to create a connection and we will want to click on the Create button.


This will create a new Connection for us within PowerApps.


Using Azure Function Connector in a PowerApp Flow

Once we have a Connection within PowerApps to our Function App, we can start using it within our Flows.

To do this, click on the Flows link within the menu bar on the left and then click on the Create from blank link in the header.


This will create a new PowerApp button for us to start building our Flow around.


Start off by clicking on the New
Step button and then click on the Add an action button.


When the Choose an action form is displayed, we can now search for the new connector that we created and select the Action that we want to link to the flow.

In this case I was able to find the DiceRollerApp and select the Dice Roller action.


And now we have a new action in the Flow that will allow us to call the Azure Function App.


If we want to act on the results of the function we can add in a condition and then when we select any value field, the returned value shows up from our Function App.


Now we can flesh out our Flow a little bit so that it has a couple of notifications based on the result that is returned from the Function App.

When we are done we can click on the Create flow button to create the flow.


After the flow has been created, all we need to do is click on the Done button.


Running the Flow

Congratulations. We now have a Flow that uses our Custom Connector, which in turn calls the Function App that we created in Azure. Let’s see it in action.

To see the flow running and calling the Function App, just click on the Pencil icon to the right of the flow.


This will open up the Flow and show us the steps and also that it is using our new Connector that we created.


To test out the Flow, just click on the More button and then click on the Run now link.


This will open up a dialog box asking us if we really want to run the Flow.

All we want to do here is click on the Run flow button.


This will then tell us that the flow ran successfully.

To see the flow execution, just click on the See flow run activity link in the dialog box.


This will open up the Activity list and we will see that the Flow ran successfully.


If we drill into the Flow we will be able to see that the Dice Roller ran, and also that the second notification was triggered.


If we expand out the Dice Roller step then we will also see that we rolled a 10.

Better luck next time I guess.


Review

Now we have a way that we can create our own custom functions and then add them into PowerApps as a custom Connector.

By using the Azure Function Apps we can create pretty much any type of function that we can think of.

For example, we can use this same scenario to create

Text manipulation or search functions,

Random data generators

Calls to other services that are not yet available within PowerApps

How cool is that?

Bots are cool. They are going to save all of us by automating all of the tasks and researching that we have to do by hand, and lead us into Utopia. Which is totally true.

Although, you may think that creating a Bot is complicated, and that you need to be a seasoned coder om order to create them.

And if you want to unleash the Bot onto the rest of the world through mediums like Skype, then you have to be an even more advanced coder because you need to understand the API’s and communication interfaces. And who on earth understands that?

Nothing can be further from the truth. You can create your own minion Bot within minutes, and then publish it as a Skype Bot in even less time.

In this walkthrough we will show you how to do this, and also solve one of the world’s greatest problems along the way.

Topics Covered

  • Creating a QnA Services with the QnAMaker
  • Creating an Azure Bot Service
  • Deploying the Bot Service to Skype
  • Conclusion

Creating a QnA Services with the QnAMaker

The first thing that you need to give your Bot is a brain, or at least a foundation that it is able to use to interact with people. You can code this by hand if you like, but another option is to cheat and get someone else to do all of the work for you.

That is where the QnAMaker comes in. This is a free service that will allow you to create Question and Answer groups that we can then publish as a conversation service.

It gets even better because you can have the QnAMaker mine a website FAQ and load in all of the information for you.

How to do it…

To do this, open up a browser and go to qnamaker.ai.

This will open up the QnA Maker service and all we need to do to start creating our service is to click on the Create new service link in the header.


This will open up a short form where we can define and publish our service.


Start off by giving your QnA Service a Service name.

Here we set the Service name to McEnroe.


There are a number of ways that you can create the Q&A pairs. You can add them manually, or if you already have a website source for the Questions and Answers, then you can paste that URL into the FAQ URL field.


Now just scroll down to the bottom of the form and click on the Create button.


This will start off the process of building the Question and Answer details for you from the FAQ site.


Shortly after that, you will be taken to the Knowledge Base form and see all of the Questions and Answers have been loaded for you.


If you like you can change any of the Questions or Answers to be more appropriate for the audience and even add additional information if you like.

When you are happy with the content, just click on the Publish button.


This will take you to the Publishing screen and all you need to do here is click on the Publish button.


That will process all of the Questions and Answers and create a QnA Service.


Creating an Azure Bot Service

Now that we have our QnA Service, we can build a Bot Service that will consume it. This is almost as easy as the creation of the knowledge base, and doesn’t require a single line of coding, because we can deploy out a Bot Service within Azure from a template.

How to do it…

To do this open up you Azure Portal and click on the New button on the left.


This will open up the Azure Marketplace with all of the services that we can take advantage of.


Rather than searching through all of the categories, just search for Bot Service.


This will open up a list of matching services, and the first one will be the Bot Service template.

All you need to do here is select it.


When the Bot Service panel opens up, just click on the Create button to start building your bot.


This will open up the Bot Service configuration panel.


Type in an App name for the Bot Service. This needs to be a unique name, because this is creating a new site on the azurewebsites.net domain.

Luckily for us the McEnroe
App name was still available.


Then enter in a new Resource Group name that you want to put this service into.

You can also change the Location and even check the Pin to dashboard options is you like.

When you are ready, click on the Create button to unleash your Bot on the world.


Azure will then start creating and deploying your Bot.


There is one last step that we need to perform to finish off the Bot though. We need to create an Application ID and secure password for the Bot.

So when the Create a Microsoft App ID form is displayed, click on the Create Microsoft App ID and password button.


This will ask you to log in with your Microsoft Account credentials.


This will open up the service that will allow us to generate an App ID for our application, and also create a password.

All we need to do here is click on the Generate an app password to continue.


This will open up a new dialog box with the Password that has been created for the app and all you need to do is copy it down.

Now we can return back to Microsoft Azure and paste in the App ID and the Password into the Create a Microsoft App ID form.


If we scroll down just a bit we will see a number of templates are available for us to choose from for the creation of the new Bot Service. One of them is a Question and Answer template.


All we need to do is select the Question and Answer template and then click on the Create bot button.


Now we will be asked to connect to a QnA service.


Just click on the Knowledge Base dropdown list and you will see that the QnA Service that we just created is listed there and we can select it to make it the source for the Bot.

After we have done that, just click on the OK button.


This will start the creation and deployment of the Bot for us.


Pretty soon after that we will be taken to the finished Bot.


Deploying the Bot Service to Skype

Now that we have created our Bot Service, we want to make this available through Skype so that we can mobilize the Bot, and take it on the road with us.

To do this, all we need to do is return back to the Bot Service and then click on the Channels tab. When we do this we will see that there are a number of different channels that we can publish the bot to, and some that have already been created – i.e. the Skype client.

To add the new Bot to Skype, just click on the Add to Skype button.


This will open up a Skype window that will ask you if you want to add the new Bot as a contact.

Just click on the Add to Contacts button.


This will take you over to Skype, with a conversation already started with our new Bot.


Let’s take it for a test drive – all we need to do is ask it a question.


When we submit the question to our Bot, it will look through the knowledge base and then give us the best response using Cortana Intelligence.


Also, this works on the smaller clients as well, including the phone apps.


Conclusion

Within a couple of minutes we have been able to create a knowledge base for our bot, create a Bot Service that uses it to reply to questions, and then added it to Skype so that we can take advantage of it anywhere.

All without a single line of code being written.

How cool is that!

Writing walkthrough guides and technical documentation is more about the flow that you are describing rather than the actual writing itself because you are wanting to explain the process, not to write the next best seller on the NY Times book list.

But there is still a little creativity that you need to make the walkthrough interesting to the reader.

Although I have noticed that there are a number of different variations of the way that people want to have walkthrough guides structured depending on the audience.

In this walkthrough I will show a new Compose feature within the Author Tools template that may help a little with this problem.

I usually use a pretty simple structure while writing my walkthroughs. For example, here is an example blurb that I write for one of my guides that explains how to assign a Customer record a Type:

The first thing that we will want to do is set the type of customer record that we want to create.

Customers are configured either as a Person or as an Organization with their own specific naming format.

To do this, click on the Type dropdown list and select the Organization Type from the list

In this example we will set the Type to Organization.

Now we have set the Customer Type.

For example, here is the storyboard slide that I used for that example


And this works pretty well in most cases.

But there are some cases where you may not want to show all of the information that I have in the text of the slide.

For example, if I wanted to create a version of the walkthrough that shows just the step description and the sample data that I need to enter then I would have to create a new version of the storyboard and then cut up each of the text blocks and change the detail.

If you dissect it then you will see that it has these components:

Introduction: The first thing that we will want to do is set the type of customer record that we want to create.

Detail: Customers are configured either as a Person or as an Organization with their own specific naming format.

Action: To do this, click on the Type dropdown list and select the Organization Type from the list

Example: In this example we will set the Type to Organization.

End: Now we have set the Customer Type.

And within that structure there are also subcomponents that are useful, like:

Action Shorthand: Select the Customer Type

Example Data: Type: Organization

Not all storyboard slides are this detailed, or have all of these components in them, but it is a good example of a structured step with a lot of detail.

What I need to do though is extract all of these components out and then pick and choose when to use them.

To solve this problem I created an Advanced Storyboard template that I can use to extract out the different parts of the text block broken out into the different components.


This allows me to move the Text content into its corresponding text block and also create some additional variations of the instructions for the Shorthand and Data blocks.


Now that I have broken out all of the text into its component blocks, now want to use these to create my new variations of the final slide text that I will be using to create my documents from.

To do this I have added a new function to the Author Tools called Compose.

This allows me to select from a number of different composition templates that then specify how I want to build up each of the text elements in the storyboard – Subtitle, Caption, Text and Notes.


If I select the Guide template then this will copy the Shorthand to the Subtitle, the Data to the Caption, build up the Text from multiple different blocks and then also add a few more of the blocks to the Notes section.


If I change the Composition Template to the Lab template and then recompose the slide then you will see that only the Shorthand and the Data is added to the Text, but a lot of the description is added to the Notes section.

This is the perfect format for Presentations because the notes will show up in the Speaker Notes section.


If I change the Composition Template to the Exercise template and then recompose the slide then you will see that only the Shorthand is added to the Text, and the Data is added to the Notes.

This is the perfect format for hands on exercises because it is short and concise.


To see this in action, I have expanded out the Storyboard from that one slide to the full walkthrough with all of the different steps broken out to use the composition blocks rather than having all of the data in the text and then built the content of the text so that it has the Guide format.


If I switch to the Write tab and then select the Recipe template, then I can create my output document using this version of the content.


This will create my Recipe style document with all of the text giving me an instructional document that everyone is able to follow.


Now I will return back to the Storyboard and recompose the storyboard text using the Lab format.


When I recreate the Recipe document based on this version of the content then all of the steps are listed out for me showing the Shorthand and Data components, but no detail.

This is a great summary document for the expert users.


Finally, if I will return back to the Storyboard and recompose the storyboard text using the Exercise format then it is even more concise.


Bit one thing that I can also do here is update the template details and change the components that are being used to build the slide. Here I added the Shorthand to the Subtitle, and the detailed text to the Notes.


Now when I create the Recipe document it has each of the Steps listed out with the data from the step as detail. This is an even better version of the Exercise in this case.


Review

The decomposition of the Storyboard steps may seem like a little bit more work as you are writing your walkthrough guides, but it is worth it.

It makes you think a little more about the structure of the content that you are creating, and also then allows you to create variations of the walkthroughs for different purposes.

If you want to create a Presentation then you may just want to have the key information showing on the slides and not have the detailed text.

If you are creating a detailed Walkthrough guide then you may want to have more explanations for the screen shots than you would normally have to help the reader guide themselves.

If you are creating Hands on Labs then you may want to skip the detail, but have the steps and shortcuts in the document for easy reference.

If you are creating Student Exercises then you may want to have the step but no data so that you can provide that as a separate document.

And now we can do that through the Compose function.

How cool is that?