Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Patch to sharepoint, replace image with blank

(1) ShareShare
ReportReport
Posted on by 395

Just trying to swap out signature with blank image if no signature is found. Can this be done in the patch section like below? (Image10 is the image i am trying to replace it with.

 

Patch(Malcolm, Defaults(Malcolm),{Signature1: If (IsBlank(CollectGallery.Selected.Signature2, CollectGallery.Selected.Image10});

Categories:
  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Patch to sharepoint, replace image with blank

    Hi Jeffer, I added a label in the gallery CollectGallery.Selected.Image10 and the result ends in the same string i am referencing to in the patch button. (ending in kjggg==)

     

    Signature1: If(
    EndsWith(
    CollectGallery.Selected.Signature1,
    "cBBgAWRAABGi1TOgAAAABJRU5ErkJggg=="
    ),
    CollectGallery.Selected.Image10,
    CollectGallery.Selected.Signature1

  • v-jefferni Profile Picture
    v-jefferni on at
    Re: Patch to sharepoint, replace image with blank

    Hi @Matt383 ,

     

    Please add another Image control in the Gallery and bond it to Image10 and see the result.

     

    Best regards,

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Patch to sharepoint, replace image with blank

    Hi Jeffer, I have referenced the string to point to the blank image (Image10) and can see Image10 with the string ending in ggg== showing in the sharepoint entry, however the pdf from the flow still shows as X or broken link

    Matt383_0-1654637796733.png

    Matt383_1-1654637880108.png

     

  • v-jefferni Profile Picture
    v-jefferni on at
    Re: Patch to sharepoint, replace image with blank

    Hi @Matt383 ,

     

    You've made it correct to use JSON string of blank image. Using Image 10 value in Compose operation was just to check if it could be used for the availability. It's not necessary now.

     

    Best regards,

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Patch to sharepoint, replace image with blank

    Hi Jeffer, Yes test with two blank signatures. There is an Image10 column in the sharepoint list. I changed the syntax to 

    EndsWith(
     CollectGallery.Selected.Signature2,
     "ABAgQIPNd0AlfRZdoTAAAAAElFTkSuQmCC"

    In powerapps patch.

    which is the json string for the blank signature2. Is that right, or should it be the json string for Image10? In what way would you use the Image10 value in the Compose operation? 

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Patch to sharepoint, replace image with blank

    Hi Jeffer,

     

    I had a look and blank signature ends in MBY4eISIECAAAECBAxAP0CAAAECBAgQiAkYgLHCxSVAgAABAgQIPNd0AlfRZdoTAAAAAElFTkSuQmCC

    I changed the formula to this string but still same results 😕

    EndsWith(
    CollectGallery.Selected.Signature1,
    "MBY4eISIECAAAECBAxAP0CAAAECBAgQiAkYgLHCxSVAgAABAgQIPNd0AlfRZdoTAAAAAElFTkSuQmCC"
    ),
    CollectGallery.Selected.Image10,
    CollectGallery.Selected.Signature1), Signature2: If(
    EndsWith(
    CollectGallery.Selected.Signature2,
    "MBY4eISIECAAAECBAxAP0CAAAECBAgQiAkYgLHCxSVAgAABAgQIPNd0AlfRZdoTAAAAAElFTkSuQmCC"
    ),
    CollectGallery.Selected.Image10,
    CollectGallery.Selected.Signature2
    )});

     

    Matt383_0-1652910788582.png

     

  • v-jefferni Profile Picture
    v-jefferni on at
    Re: Patch to sharepoint, replace image with blank

    Hi @Matt383 ,

     

    Even if there is no signature in the Pen Input control, there should be JSON string for the blank image in the collection, and it should be end with the part from my previous post:

    vjefferni_0-1652852405935.png

     

    My formula was to check the end part of the JSON strings from the two signatures to replace any signature with the JSON of image 10 

    Patch(
     Malcolm, 
     Defaults(Malcolm),
     {
     Signature1: If(
     EndsWith(
     CollectGallery.Selected.Signature1,
     "MgQOABYzEA52Z8YEEAAAAASUVORK5CYII="
     ), 
     CollectGallery.Selected.Image10,
     CollectGallery.Selected.Signature1
     ),
     Signature2: If(
     EndsWith(
     CollectGallery.Selected.Signature2,
     "MgQOABYzEA52Z8YEEAAAAASUVORK5CYII="
     ), 
     CollectGallery.Selected.Image10,
     CollectGallery.Selected.Signature2
     ),
     Image10: CollectGallery.Selected.Image10
     }
    );
    SaveData(KBLMalcolm."MalcolmKeep")

     

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Patch to sharepoint, replace image with blank

    Hi Jeffer, where do i find the json string for the signatures? If no signature is entered, there is nothing in the collection under signature1. The image10 (blank image replacement) Is what i provided in previous post.

  • v-jefferni Profile Picture
    v-jefferni on at
    Re: Patch to sharepoint, replace image with blank

    Hi @Matt383 ,

     

    Sorry my bad. I need to check if the JSON string of the two blank signatures are end with "MgQOABYzEA52Z8YEEAAAAASUVORK5CYII=" in the collection "KBLMalcolm"

     

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Patch to sharepoint, replace image with blank

    This is how image10 is displayed in sharepoint data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAMAAAAPkIrYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkFGMzc2MkFDMThDRjExRUJBNDVBREY4MTg0QjgzMkMyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkFGMzc2MkFEMThDRjExRUJBNDVBREY4MTg0QjgzMkMyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QUYzNzYyQUExOENGMTFFQkE0NUFERjgxODRCODMyQzIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QUYzNzYyQUIxOENGMTFFQkE0NUFERjgxODRCODMyQzIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6RoGuZAAAABlBMVEX///8AAABVwtN+AAAAH0lEQVR42uzBgQAAAADDoPlTX+AIVQEAAAAAwDcBBgAWRAABGi1TOgAAAABJRU5ErkJggg==

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard