cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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.
Highlighted
Helper II
Helper II

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
    }
);
Highlighted
Community Support
Community Support

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,148)