Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

HTML have an alternative image if none selected

(0) ShareShare
ReportReport
Posted on by 395
html Replace image alternative image
Monday

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:

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,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard