
Announcements
Can anyone point me in the right direction in regards to updating my below code with an IF statement on the Start Date cell?
Essentially I want to check IF Start Date = End Date, then merge the cells (<td colspan='2'>), else, leave the cells as is. Below is an example of how the cells should be merged for same Date vs 2 different dates.
I'm having an issue putting together the If statement and the html formatting.
"<style> th { font-weight: bold; font-size: 20px; background-color: #00A8E0; } td { font-weight: normal; font-size: 18px; }</style>
<table border=1 style=text-align:center; width:100%;>
<tr>
<th>Approved?</th>
<th>Requester</th>
<th>Start Date</th>
<th>End Date</th>
<th>Notes</th></tr>" & Concat(Gallery1.AllItems,$"<tr>
<td style=text-align:center; width:100%>{If(ThisRecord.Checkbox1.Value=true,"✅ APPROVED","❌")}
<td style=text-align:center; width:100%>{ThisRecord.'aCreated By'.DisplayName}
<td style=text-align:center; width:100%>{ThisRecord.'Start Date'}
</td></tr>")&"</table>"
Place this in a HTML control, should help you figure out your own syntax
"<style> th { font-weight: bold; font-size: 20px; background-color: #00A8E0; } td { font-weight: normal; font-size: 18px; }</style>
<table border=1 style=text-align:center; width:100%;>
<tr>
<th>Approved?</th>
<th>Requester</th>
<th>Start Date</th>
<th>End Date</th>
<th>Notes</th></tr><tr>"
&
Concat(
ForAll(Sequence(2) As exampleRows,
Switch(exampleRows.Value,1,
"<td style=text-align:center; width:100%>{1}
<td style=text-align:center; width:100%>{1}
<td style=text-align:center; width:100%>{1}
<td style=text-align:center; width:100%>{1}
<td style=text-align:center; width:100%>{1}</td></tr>",
"<td style=text-align:center; width:100%>{1}
<td style=text-align:center; width:100%>{1}
<td style=text-align:center; width:100% colspan='2'>{22}
<td style=text-align:center; width:100%>{1}</td></tr>")),Value)&
"</table>"