Hi there!
I want to create a report containing many items from a Gallery (filtered in PowerApps). Each item has a grade. Upon this grade, a different image should appear. Then, by clicking on a button, the html field is send to power automate to create a pdf.
I manage to get an image in the pdf document, but I cannot manage to change the image upon the grade.
On Start of the app, I set a variable for each grade, containing the image
(for example:
Set(varMatrix22,"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAwADAAAD/4REQRX...")
)
My report built in html is as following:
<table style:'width:100%'>
<tr>
<th style='width:70%'> Risk description</th>
<th>Evaluation</th> <th>Divers to be determined later</th>
</tr>"&Concat(RenameColumns(GalleryReport_1.AllItems,"ID","MainID"),"<tr><td>"&Title&"<br>"&Description&"<table>"&Concat(Sort(Filter(ComplianceRisksAP,IDMainList=MainID),ActionNumber,Ascending),"<tr><td>"&ActionNumber&". "&Title&"</td>
<td> "&PourcentageAchievement&"</td></tr>")&"
</table>"&"</td>
<td>Inherent risk: "&ProbableRisk&"<br> MatrixImage:"&MatrixValue&"
<br>
<img src='"& varMatrix22 &"'>
</td><td>" & QuantiOrUQ &"
</tr>")&"
</table>
I would need to change the part in red (22) to be variable (value being 11,22,33,43,44,55, for example, depending on the items in the filtered gallery), or change the whole varMatrix22.
The value comes from the gallery (based on a SharePoint list, column MatrixValue as variable to get the right image).
Has anybody an idea how I could do this?
If not directly in Powerapps (favorite solution), maybe with power automate?
Thanks a lot in advance for you help.
Kind regards,
Christelle