cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
eXir
Level: Powered On

Change filename of a saved camera image in Onedrive (excel)

I'm making an app based on the MS example: "Site Inspection".

 

This example app uses OneDrive and:
Creates a file data.xls

Creates a folder data_images

Creates multiple images (1-100.jpg, 1-101.jpg)

 

When i add a 2 new photos using the app it creates 2 new rows in excel and add the images in the data_images folder.

Excel:

image.png

 

 

 

 

 

 

 

 

 

 

 

 

 

As you can see the filename look like a GUID. I Want it to be 6-100 and 6-101 like the previous ones.

 

Is this possible to do? (looks like the example data is manual edited?)

 

This question has been asked before (see bottum of the page, but the original question is solved:
Link

 

A microsoft blog almost has an answere (the call an API with a function whre FileName is added)

Blog

 

Collect(MyPictures, {URL:ImageUploadAPI.UploadImage(Camera1.Photo, {fileName: TextInput1.Text}).FileURL, Name:TextInput1.Text, Time:Now()})

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Change filename of a saved camera image in Onedrive (excel)

Hi @eXir,

 

Currently I can't find a way to change the image name saved by the camera control within PowerApps, the image name should be saved automatically.

And yes, here I suggest to change the name manually, for both the Excel data and the Image in the image folder.

Besides, I think it is a good idea for the camera control to have a property to rename the image saved.

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Change filename of a saved camera image in Onedrive (excel)

Hi @eXir,

 

It should work.

in addition to the Excel data, you should notice that there is an image folder generated together, if you would like to modify the image name under the Excel table, then please make sure the image saved into the Image folder also changes to the corresponding name.

 

The path under the Excel table should be a relative path for PowerApps to find the image saved, if the value (or saying the image name ) matches, then PowerApps should work.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
eXir
Level: Powered On

Re: Change filename of a saved camera image in Onedrive (excel)

Hi @v-micsh-msft

 

Thanks for the reply. 
The app is working fine, excel and the folder are updated every time. 


What i want is to modify the file name or give some extra information in the image file.

 

From the camera screen you can find both these OnSelect were the image is created with.

Photo :Camera1.Photo
Photo:Last(FirstN(CameraPhotos;1))

 

If(CountRows(CameraPhotos) <=7 ;Collect(CameraPhotos; {Note:"";Photo :Camera1.Photo; PhotoId :CountRows(CameraPhotos)}))
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:Gallery3.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:Gallery3.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:Gallery3.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:Gallery3.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:Gallery3.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:Gallery3.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:Gallery3.Selected.ID;Note:Text(Last(FirstN(CameraPhotos;7)).Note)})}));;
Navigate(EditInspectionScreen;ScreenTransition.Fade);;Clear(CameraPhotos))

 

Is there a way to change the filename from powerapps?
Or are you suggesting to change it manually?

Community Support Team
Community Support Team

Re: Change filename of a saved camera image in Onedrive (excel)

Hi @eXir,

 

Currently I can't find a way to change the image name saved by the camera control within PowerApps, the image name should be saved automatically.

And yes, here I suggest to change the name manually, for both the Excel data and the Image in the image folder.

Besides, I think it is a good idea for the camera control to have a property to rename the image saved.

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

carlosRodri
Level: Powered On

Re: Change filename of a saved camera image in Onedrive (excel)

Hola encontraste una solucion yo tambien estoy intentado hacer una cadena con datos y descripciones para agregarlos al nombre de la imagen y no encuentro la forma. me crea un GUI 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 326 members 5,803 guests
Please welcome our newest community members: