02-08-2019 03:21 AM - last edited 02-08-2019 03:21 AM
Here's my entry for the PowerApps Challenge: Find the shortest path from A to Z
I have chosen a Dynamics entity in CDS and a SharePoint list as my data source. The idea is that we hold spa treatments in CDS, and store a Knowledge Base in SharePoint to help new starters learn what the treatments are about and what skills are needed.
In order to abstract the data source from the end user, I have set up a flow that returns the SharePoint data to PowerApps - this means the end users won't know where the knowledge base is held and I feel is great for when users only need read only access.
The trigger is "PowerApps", it then uses "Get items" from SharePoint and uses the "Response" action to return the value of "Get items" to PowerApps.
It's important to specify the payload here, so PowerApps knows what's what in the JSON that's returned. An easy way to do this is to run the Flow in Test once, copied the generated response and use "use sample payload to generate schema"
The app connects to two data sources, one is a custom entity in CDS that brings back information from Dynamics and the second one is the Flow we have created above.
The app consists of two galleries, one for each data source. The first gallery is linked to the CDS entity "Clubhouse Spa Treatment(s)".
In the OnVisible() event of the Screen, I store the data from the Flow run in a collection. This means the Flow is run on startup, and not every time an item in the gallery is selected.
Lastly, the second gallery is set to display items filtered to where the Title of the SharePoint list equals the Title (name) of the CDS entity.
I had many ideas for this one, but decided to keep it as simple as possible by just using a Button Flow. The idea is that the candy shop owner would use the button to input SKU number and quantity sold every time they make a sale, and that information is stored in an Excel spreadsheet for inventory tracking.
Here's the Excel spreadsheet table, it is stored in OneDrive
And here's the flow, taking SKU number and Quantity as input and storing that information together with the timestamp in Excel.
I wanted to demonstrate how simple the way from A to Z sometimes is, and how sometimes solutions really can be very simple.
I'm not sure I found the best solution for this challenge but thought I'd share my idea anyway - I'm again using a button worfklow, where I can input a reason, location, and the date the photo was taken as well as upload the photo. I'm asking for location / date, in case I'm retrospectively uploading photos rather than using the timestamp and longitude/latitude of the flow.
I then create the uploaded file in SharePoint using the "Create File" action. I have added additional meta data columns to the SahrePoint document library, and use "Update file properties" on the newly created file to update the meta data as provided in the manual input.
You did an awesome job! Thanks for detailing what you did and sharing screen shots as well as the app.
I like your very creative approach to challenge #1 too! It could be used in several business scenarios, and I had not thought about it at all. You're a true problem-solver! As an alternative, you could also use SharePoint permissions. The app consumer won't be able to tell what specific connections you have unless they use Fiddler or something. 🙂
I'l be reaching out on Tuesday, so stand by!