Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Blogs / CleverAX / Product Drawing PowerApp. P...

Product Drawing PowerApp. Part 2

In the previous post we created two Flows, one gets the list of files from the SharePoint  portal and second displays pdf file content in the PowerApp. In this post we will create  PowerApp that is called from MSDyn365FO and uses both Flows to display Drawings for selected product.

In the PowerApp designer add Gallery and PdfViewer controls to the main app screen:

ProductDrawingApp_FlowGetFiles_AppOnStart

To trigger Get files Flow automatically on the PowerApp start we should set OnStart property with the following expression:

ClearCollect(AppCollection,'PowerApp->Getfiles'.Run(Param("EntityId")))

With this expression we create a collection called AppCollection and add to the collection the output of Get files Flow which represents the product drawing file list. Also, we pass “Param(‘EntityId’)” to the Flow, which is a value from MSDyn365FO.

Then we set the Gallery’s Items property to the name of our collection – AppCollection:

ProductDrawingApp_FlowGetFiles_AppGalleryItems

and change the Labels inside the gallery to the desired columns:

ProductDrawingApp_FlowGetFiles_GalleryFields

On the next step we set PdfViewer Document property as per below:

ProductDrawingApp_PdfViewer

Where the link is http request from Flow 2 (Display Pdf) amended with SharePoint library folder name and file name from the gallery (&itemurl=/Shared documents/”&FileList.Selected.FileName )

ProductDrawingApp_GetPdfFlow_Http

ProductDrawingApp_PdfViewerLink

After everything is completed we can add our app to MSDyn365FO to the All production orders list page. Refer to this article for step by step description on how to embed power app to MSDyn365FO and do not forget to pass item number from the production order to the app.

Result:

ProductDrawingApp

With minor changes you can make it as standalone app that shows you all product drawings and does not require MSDyn365FO to open.


This was originally posted here.

Comments

*This post is locked for comments