PATCH A SharePoint Image Column In Power Apps



Goal

Upload an image called Business Cat to the AnimalImages field.


Input

Animal Pictures (SharePoint List)

IDDescriptionAnimalImages
1A picture of a cat


Patch Function Code
Patch(
    'Travel Expenses',
    LookUp('Travel Expenses', ID=1),
    {
        AnimalImages: 'Business-Cat'
    }
)

Upload a file called mole-picture.jpg to the AnimalImages field.


Output

Animal Pictures (SharePoint List)

IDDescriptionAnimalImages
1A picture of a cat




Scenario #1: Add Picture

Patch a value found in an Add Picture control to an Image field.



Patch Function Code
Patch(
    'Travel Expenses',
    LookUp('Travel Expenses', ID=1),
    {
        AnimalImage: AddMediaButton1.Media
    }
)




Scenario #2: Pen Input

Patch a signature found in a Pen Input control to an Image field.



Patch Function Code
Patch(
    'Travel Expenses',
    LookUp('Travel Expenses', ID=1),
    {
        AnimalImage: PenInput1.Image
    }
)




Scenario #3: Camera

Patch a photo found in a Camera control to an Image field.



Patch Function Code
Patch(
    'Travel Expenses',
    LookUp('Travel Expenses', ID=1),
    {
        AnimalImage: Camera1.Photo
    }
)



* Note: the user must first click on the Camera control to load the Photo property with an image.