cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

BEST PRACTICES: Take, view, delete and upload photos in PowerApps

We REALLY need to iron out repeatable patterns for taking, viewing, deleting and uploading photos within PowerApps. Ideally building a component for this.

Here is my current pattern (pseudocode), I don't like it and want your input:

  1. Form Screen:
    1. OnVisible
      1. If EditForm and Record has uploaded images, then Collect images where GUID = varGUID
    2. Camera icon OnSelect
      1. Navigate to Photo Screen
  2. Photo Screen:
    1. OnVisible
      1. Reset/hide controls/setup screen
    2. AddMedia control
      1. User selects/takes photo
      2. AddMedia.Image shown along with a comment box
      3. User clicks "Save" button
      4. Image and metadata (comments, GUID, etc.) bundled using JSON()
      5. JSON() bundle sent to Flow. Flow creates image in Sharepoint Document Library
  3. Timer control
    1. 10 second timer starts with Spinner on the screen (THIS IS THE PART I DON"T LIKE, USER HAS TO WAIT FOR 10 SECS HERE)
    2. OnTimerEnd property
      1. ClearCollect colUploadedPhotos from Sharepoint Doc Library all photos where GUID = varGUID
  4. Picture Gallery
    1. Items property
      1. colUploadedPhotos
    2. Image property within Gallery, ThisItem.{Thumbnail}
  5. Refresh Button
    1. Sometimes 10 seconds is not enough for the Flow to run and users new photo does not show up.
    2. OnSelect property
      1.  ClearCollect colUploadedPhotos from Sharepoint Doc Library all photos where GUID = varGUID (until the images show up)

Ideally, I'm looking for a pattern where user can View/Delete photos as soon as they are "saved" within the app. Then (maybe?) one big Upload at the end of adding all photos.

Thoughts?

1 REPLY 1
dynamicsedge
Level 10

Re: BEST PRACTICES: Take, view, delete and upload photos in PowerApps

@ericonline 

 

Great idea, we might look into this as it could be useful.

 

We have the Timer part we recently shared with the Community

App Timer Wait Recipe 

 

The rest of it, we do not have it but it is something we might look into, interesting idea. Would you be interested in a fully fleshed app template that does all of these things?

 

As for improving your pseudocode, we think after looking at it a couple times, the pseudocode sounds about right but obviously it's worth taking a few close looks at it to make sure there isn't an easier way (but there may not be an easier way).

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,340)