cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Austin_E
Frequent Visitor

Dataverse table with inspection items: add an identifying photo for each inspection item

I have a dataverse table with inspection items. This table has all the identifying information for each item. Name, Location, etc etc. I also want to add a photo prior to completing the inspection as an additional way to identify the item for an inspector. Is there a way to batch upload these, like there is for data. It doesn't look like I'll be able to do an excel import which includes these images. Right now the only way I've come up with is tediously updating each line item by submitting a form with the associated picture through a powerapps screen, which does not feel like the best solution.

 

 

4 REPLIES 4
SBax
Impactful Individual
Impactful Individual

Hi Austin,

 

Is there one photo for each type of item, or one unique photo per file? 

 

If it's the first, you could use the out of the box product table which has an image field.

 

You would then have a lookup column to the product table on your form, and display the product image on the form by pulling it from the related product?

 

Happy to discuss in more detail if you think this option might work?

Austin_E
Frequent Visitor

One unique photo as an identifier for each inspection item.

 

I have a report called [MY REPORT] with a dedicated [CHECKLIST]. I have an item database with [MY ITEMS]. When I open a new [MY REPORT] there is a gallery with [MY ITEMS]. Each item in [MY ITEMS] has a Name, Location, Size, Material. I want to add an Image as another field per row in [MY ITEMS], that way each item in [MY ITEMS] will have a Name, Location, Size, Material, Image. Those five categories will be displayed in the gallery when I'm doing a new report.

 

This is not adding an image as data in the [CHECKLIST].

SBax
Impactful Individual
Impactful Individual

Hi Austin,

 

Can you add a screenshot of the gallery please?

Austin_E
Frequent Visitor

I still am not sure if it's possible to batch import pictures, as I posed in the OP. If anyone knows if that's possible, let me know. I assume the mechanisms would double for attaching any files, too, so if anyone has experience doing that, let me know.

 

I actually figured my application would necessarily need a functional screen to update item pictures one-by-one as well. So I've set up that screen, and if there is no batching ability, a user will have to go around an update the item pictures one-by-one using this screen initially.

 

For that, I will share my solution. There is a filterable gallery - you must specify your facility in a dropdown, and then there are tabs for the different report types. The different report types have different items. You can then select items in that gallery. Once an item is selected, the default "Add picture" from the Media dropdown was used.

The Save button has the following code in On Select:

Patch(All_Items_Lists,LookUp(All_Items_Lists,ItemID=varItemSelected_PIC_UPDATER),{Item_Photo:UploadedImage1.Image});

Notify("Item picture updated successfully.",NotificationType.Success,1000);

Reset(AddMediaButton1);

 

The Patch statement calls the original data table hosting item data and where I want to send the picture. The LookUp calls the specific gallery item selected (selecting a gallery item sets the variable varItemSelected_PIC_UPDATER to the corresponding ItemID. Then we just choose the column value to update, Item_Photo, and patch in the UploadedImage1 from the default "Add picture" group in the screen. An important part of this function is making sure you have the ".Image" specifying your datatype. I assumed PowerApps sets the UploadedImage1 datatype to Image automatically, but that is not true. The function will not get flagged by the error handler for trying to patch a non-image datatype to an Image datatype in the dataverse tables - so that took me a bit to figure out...

 

The notify statement is self-explanatory. The reset statement will reset your image to the default on submittal, this way we're not accidently carrying the image forward if a user is saving additional photos for items and miss-clicks.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (2,762)