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

Set Image Folder and ImageName

Hi All

 

Working on first PowerApp (for inspecting crops in greenhouses). All working quite well, but there are a few things I'm stuck on. The images get inserted into Excel and save on OneDrive:

 

.\Crops_images\0f18c1f774e7468488cf572470c5b69e.png

 

 

Here's My Submit code:

 

SubmitForm(EditCropForm);
Patch(
    tblInspectionPix,
    Defaults(tblInspectionPix),
    {
        LastScanDate: Now(),
        CropID: CropGallery.Selected.CropID,
        UserName: User().FullName,
        Photo: Last(
            FirstN(
                CameraPhotos,
                1
            )
        ).Photo
    }
);

What I'm puzzled about is:

 

  1. where did it get the path .\crop_images from and can I control this?
  2. I'd lie to use a naming ocnventiopn for the files. Is this possible (instead of a GUID)?

 

Thanks

 

Mark

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Set Image Folder and ImageName

Hi @Mark2457 ,

 

If your app is already created, and you want to save the after added pictures to other folders, then I'm afraid that this cannot be achieved. Unless you change all the URLs of the images in your excel table to the new folder location, then recreate the app with this table. 

 

Regards,

Mona

Community Support Team _ Mona Li
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

3 REPLIES 3
Community Support Team
Community Support Team

Re: Set Image Folder and ImageName

Hi @Mark2457 ,

 

If you mean that you want to change the place to store these images then yes, you can achieve this by set the data in one column your excel table to something like:

"./FolderName/imagename.jpeg"

"FolderName" is the folder that you holds these images.  Do notice that the paths in the Excel table need to be forward slashes instead of backslashes.

Also notice that you should set the column name to xxx[image] in excel table to make this work.

 

And I think currently you cannot change the image name from PowerApps.

 

For more information, please refer to below documentation:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/tutorial-working-with-images-in-excel

 

Regards,

Mona

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

Re: Set Image Folder and ImageName

Thanks for reply

 

Here's my code to save the image. So where would I put the path in this line? Photo is data type of image

 

Photo: Last( FirstN( CameraPhotos, 1 ) ).Photo

 

Patch(
    tblInspectionPix,
    Defaults(tblInspectionPix),
    {
        LastScanDate: Now(),
        UserName: varUserName,
        Photo: Last(
            FirstN(
                CameraPhotos,
                1
            )
        ).Photo
    }
);
Community Support Team
Community Support Team

Re: Set Image Folder and ImageName

Hi @Mark2457 ,

 

If your app is already created, and you want to save the after added pictures to other folders, then I'm afraid that this cannot be achieved. Unless you change all the URLs of the images in your excel table to the new folder location, then recreate the app with this table. 

 

Regards,

Mona

Community Support Team _ Mona Li
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

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 (Last 30 Days)
Users online (5,579)