If condition within a #foreach loop of Advanced Print View
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I've created an Advanced Print View that includes grid data. What I'd like to be able to do is to put within the #foreach loop an if statement that only executes if the property value call DATE_COMPLETED is null. What I'm having difficulty with is the syntax/formatting of the If statement within the #foreach loop...nothing i've tired works - actually what I put in is alway removed by the IDE upon save. Is what i'm trying to do possible, is so please provide some guidance.
I've included the code segment and added may comments in bold letters in the code.
Thank you!
JD
<table>
<tbody>
<tr><th class="header" colspan="7">${workspace.metadata.grid.title.value}</th></tr>
<tr><th><span>${workspace.metadata.grid.fields.COURSES.title}</span></th><th><span>${workspace.metadata.grid.fields.DATE_DUE.title}</span></th><th><span>${workspace.metadata.grid.fields.DATE_COMPLETED.title}</span></th><th>Employee Signature</th><th>Trainer</th><th>Trainer Signature</th><th>Date Verified</th></tr>
<!-- #foreach( $grid in $item.grid.rows ) -->
ONLY EXECUTE THESE LINES if DATA_COMPLETE IS = NULL
<tr>
<td>${grid.COURSES.value}</td>
<td>${grid.DATE_DUE.value}</td>
<td>${grid.DATE_COMPLETED.value}</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
END
<!-- #end --></tbody>
</table>