web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Site Inspector templat...
Power Apps
Answered

Site Inspector template - upload pictures

(0) ShareShare
ReportReport
Posted on by 308

Hi I'm using site inspector template but want to upload pictures instead of take pictures.

 

How do I set formulas in camerascreen for this option?

 

Has anyone made this?

 

Thanks for help.

Categories:
  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @alessandramaced ,

    I have not seen the app, but you would need to use an "Add Picture" Control. 

    The next action would depend on where you are saving your pictures.

     

    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.

     

  • alessandramaced Profile Picture
    308 on at

    Hi

     

    In this screen (CameraScreen) there are these formulas:

     

     

    In Camera (Camera1): 

    "If(CountRows(CameraPhotos) <=7 ;Collect(CameraPhotos; {Note:"";Photo :camera1.Photo; PhotoId :Max(CameraPhotos; PhotoId)+1}))"

     

    In Save Bottom: 

    "If(NewRecord;Navigate(NewInspectionScreen;ScreenTransition.Fade);
    If(CountRows(CameraPhotos)>=1;UpdateContext({AddPhoto:Patch(SitePhotos;Defaults(SitePhotos);{PhotoId:Max(SitePhotos;PhotoId)+1;Photo:Last(FirstN(CameraPhotos;1)).Photo;ID:Gallery1.Selected.ID;Note:Text(Last(FirstN(CameraPhotos;1)).Note)})}));;
    If(CountRows(CameraPhotos)>=2;UpdateContext({AddPhoto:Patch(SitePhotos;Defaults(SitePhotos);{PhotoId:Max(SitePhotos;PhotoId)+1;Photo:Last(FirstN(CameraPhotos;2)).Photo;ID:Gallery1.Selected.ID;Note:Text(Last(FirstN(CameraPhotos;2)).Note)})}));;
    If(CountRows(CameraPhotos)>=3;UpdateContext({AddPhoto:Patch(SitePhotos;Defaults(SitePhotos);{PhotoId:Max(SitePhotos;PhotoId)+1;Photo:Last(FirstN(CameraPhotos;3)).Photo;ID:Gallery1.Selected.ID;Note:Text(Last(FirstN(CameraPhotos;3)).Note)})}));;
    If(CountRows(CameraPhotos)>=4;UpdateContext({AddPhoto:Patch(SitePhotos;Defaults(SitePhotos);{PhotoId:Max(SitePhotos;PhotoId)+1;Photo:Last(FirstN(CameraPhotos;4)).Photo;ID:Gallery1.Selected.ID;Note:Text(Last(FirstN(CameraPhotos;4)).Note)})}));;
    If(CountRows(CameraPhotos)>=5;UpdateContext({AddPhoto:Patch(SitePhotos;Defaults(SitePhotos);{PhotoId:Max(SitePhotos;PhotoId)+1;Photo:Last(FirstN(CameraPhotos;5)).Photo;ID:Gallery1.Selected.ID;Note:Text(Last(FirstN(CameraPhotos;5)).Note)})}));;
    If(CountRows(CameraPhotos)>=6;UpdateContext({AddPhoto:Patch(SitePhotos;Defaults(SitePhotos);{PhotoId:Max(SitePhotos;PhotoId)+1;Photo:Last(FirstN(CameraPhotos;6)).Photo;ID:Gallery1.Selected.ID;Note:Text(Last(FirstN(CameraPhotos;6)).Note)})}));;
    If(CountRows(CameraPhotos)>=7;UpdateContext({AddPhoto:Patch(SitePhotos;Defaults(SitePhotos);{PhotoId:Max(SitePhotos;PhotoId)+1;Photo:Last(FirstN(CameraPhotos;7)).Photo;ID:Gallery1.Selected.ID;Note:Text(Last(FirstN(CameraPhotos;7)).Note)})}));;
    Navigate(EditInspectionScreen;ScreenTransition.Fade);;Clear(CameraPhotos))"

     

    I have to change Camera1 (photo) to adquireImage (upload pictures).

    But what I have to change in formulas?

    The pictures are saved in folder "data_images" and the names and numbers of pictures in file "data.xls" as  above:

     sitephotos.PNG

     

    How do I do?

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @alessandramaced ,

    You did not mention Excel - I was assuming SharePoint.

    You can save to a SharePoint Library and access that from Power Apps for for Excel, I am not sure it is possible.

     

  • eka24 Profile Picture
    20,925 on at

    You can follow these steps:
    First import your Pictures into the App

     

    Then:
    Create a Collection OnStart of the App:
    ClearCollect(PicCollection,
    {PhotoID:1, Image: "1-100"},
    {PhotoID:2, Image: "1-102"},
    {PhotoID:3, Image: "1-103"})

     

    Then image in the gallery should be:

    LookUp(PicCollection,PhotoID=ThisItem.PhotoID,Image)

     

    Also;
    https://powerusers.microsoft.com/t5/Building-Power-Apps/Display-a-picture-based-on-field-value/m-p/583513#M182451

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @alessandramaced ,

     

    The purpose of the camera is simply to save the captured pictures into CameraPhotos collection, if you want to change the camera to Add picture control, you only need to set the OnSelect property to AddMediaWithImage1 as follows, and remove the Camera control.

    If(CountRows(CameraPhotos) <=7 ,Collect(CameraPhotos, {Note:"",Photo :UploadedImage1.Image, PhotoId : Max(CameraPhotos,PhotoId)+1}))

    Snipaste_2020-06-29_11-11-02.png

    Hope this helps.

    Sik 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard