Hi All,
Does anyone have experience with the Site Inspector template app, and saving the images from there into a network folder location?
We've setup flow buttons that do something similar (take a photo on the phone, upload to a network folder) however not sure how to integrate that into the app itself.
Possibly a way to integrate a flow command onto the 'Save' button from 'NewInspectionScreen'
Any ideas appreciated.
Thanks!
Solved! Go to Solution.
Hi @SamTimmins ,
Could you please share a bit more about your scenario?
Do you want to save images collection from your canvas app to your Network folder location?
Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs in PowerApps currently. As an alternative solution, I think the combination of PowerApps and Power Automate could achieve your needs.
On your side, you could consider pass the images collection back to your flow, then within your flow, add a "Create file" action of "File System" action, use it to create image file in your Network folder based on the passed image data.
I have made a test on my side, please consider take a try with the following workaround:
Within your "Site Inspector" template app, go to the Camera screen, modify the formula within the OnSelect property of the Camera control to following:
If(
CountRows(CameraPhotos) <=7 ,
Collect(
CameraPhotos,
{
Note: "",
Photo: Substitute(JSON(camera1.Photo,JSONFormat.IncludeBinaryData),"""",""), // Modify formula here
PhotoId: CountRows(CameraPhotos)
}
)
)
Flow's configuration:
Within the "Create file" action of File System connector, File name field set to following:
concat(item()?['PhotoId'], '.jpg')
File content field set to following:
dataUriToBinary(item()?['Photo'])
Then within your "Site Inspector" template app, go to the NewInspectionScreen, add the following formula within the OnSelect property of the "Done" button:
SaveImageCollectionstoLocalNetworkFolder.Run(JSON(CameraPhotos))
More details about firing a flow from an app, please check the following video or article:
https://www.youtube.com/watch?v=1wl9AtxWdkg
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows
Best regards,
Hi @SamTimmins ,
I had a quick look.
Firstly, camera1 on the CameraScreen is the same type of control and the OnSelect runs
If(
CountRows(CameraPhotos) <= 7,
Collect(
CameraPhotos,
{
Note: "",
Photo: camera1.Photo,
PhotoId: Max(
CameraPhotos,
PhotoId
) + 1
}
)
)
which sends the photo off to a collection called CameraPhotos - very similar to the colPhoto in the example I posted for you.
The data sources in the example are off on your private storage (it sent mine to my G Drive as I was logged in on Chrome).
So after you add your SharePoint Library, you should be able to do something similar for CameraPhotos as you have for colPhoto
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @SamTimmins ,
Could you please share a bit more about your scenario?
Do you want to save images collection from your canvas app to your Network folder location?
Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs in PowerApps currently. As an alternative solution, I think the combination of PowerApps and Power Automate could achieve your needs.
On your side, you could consider pass the images collection back to your flow, then within your flow, add a "Create file" action of "File System" action, use it to create image file in your Network folder based on the passed image data.
I have made a test on my side, please consider take a try with the following workaround:
Within your "Site Inspector" template app, go to the Camera screen, modify the formula within the OnSelect property of the Camera control to following:
If(
CountRows(CameraPhotos) <=7 ,
Collect(
CameraPhotos,
{
Note: "",
Photo: Substitute(JSON(camera1.Photo,JSONFormat.IncludeBinaryData),"""",""), // Modify formula here
PhotoId: CountRows(CameraPhotos)
}
)
)
Flow's configuration:
Within the "Create file" action of File System connector, File name field set to following:
concat(item()?['PhotoId'], '.jpg')
File content field set to following:
dataUriToBinary(item()?['Photo'])
Then within your "Site Inspector" template app, go to the NewInspectionScreen, add the following formula within the OnSelect property of the "Done" button:
SaveImageCollectionstoLocalNetworkFolder.Run(JSON(CameraPhotos))
More details about firing a flow from an app, please check the following video or article:
https://www.youtube.com/watch?v=1wl9AtxWdkg
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows
Best regards,
User | Count |
---|---|
160 | |
84 | |
68 | |
63 | |
61 |
User | Count |
---|---|
209 | |
146 | |
95 | |
82 | |
67 |