Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

html Replace image alternative image

(0) ShareShare
ReportReport
Posted on by 395

I have an app writing to sharepoint list, then have a flow with some html in the compose that pulls the data in. (See attached flow.png) I have Signature which comes across in the html fine but when the user doesn't enter a signature, i am left with a red x. I have created a blank image to replace it called Image10 and want to have something in the html so that when a signature isnt entered, Image10 shows instead of the red x. Below is a sample of the html. I have been playing around with different ideas however still seeing the same result. This the most recent attempt

<td style="width: 120.3px;" colspan="2"><strong><img src="',variables('objectList')?['Signature1'],'" onerror="this.onerror=null;this.src="',variables('objectList')?['Image10'],'";" />

 

concat('<!DOCTYPE html>
<html>
<h3>Mechanical Pty Ltd</h3>
<p>&nbsp;</p>
<div>
<table style="height: 117px; width: 580px; float: left;">
<tbody>
<tr>
<td style="width: 130px; text-align: left;"><strong>Date:</strong></td>
<td style="width: 130px;">',variables('objectList')?['Date'],'</td>
</tr>
<tr>
<td style="width: 120.3px;" colspan="2"><strong><img src="',variables('objectList')?['Signature1'],'" width="60" height="60" /></strong></td>
</tr>
</tbody>
</table>
</div>
</html>')

 

Any ideas would be much appreciated

Mat383

Categories:
  • Matt383 Profile Picture
    Matt383 395 on at
    Re: html Replace image alternative image

    Hi Ashwin7104, do you mean in the flow, after Initialize variable, add a Condition, then select Signature1 from value, is equal to (expression null). Then below, "If Yes, GetItem, then Compose and put the html in there replacing Signature1 with Image10? I just tried it that way, no errors but still red x

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: html Replace image alternative image

    Hi Ashwin7104, do you mean in the flow, after Initialize variable, add a Condition, then select Signature1 from value, is equal to (expression null). Then below, "If Yes, GetItem, then Compose and put the html in there replacing Signature1 with Image10? I just tried it that way, no errors but still red x

  • Ashwin7104 Profile Picture
    Ashwin7104 671 on at
    Re: html Replace image alternative image

    Hi @Matt383 ,

     

    Why don't we use an if condition before compose to see if the signature is empty, then put Image 10 to the signature variables and use it in compose? 

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