web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / html Replace image alt...
Power Apps
Unanswered

html Replace image alternative image

(0) ShareShare
ReportReport
Posted on by 407

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

Flow.png
Categories:
I have the same question (0)
  • Ashwin7104 Profile Picture
    671 on at

    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? 

  • Matt383 Profile Picture
    407 on at

    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
    407 on at

    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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard