XModPro

Need Help With Select Case

Drew Drew posted Jun 22, 2016
Active Sep 2 · Viewed 2491 times

The following select is taking a serial number from a url parameter. The first two cases work great.
However, if the serial number is not in the database I want the second two cases to compare the serial number with a hard coded value.
I tried pulling the url parameter into the last two cases for comparison but it fails. I believe this is simply because its not in the database so it skips to the else code.
This makes sense but I cannot see a way around this.

<xmod:Select>
<Case CompareType="date" Operator=">" Value='[[TransactionDate]]' Expression='[[DateAdd:-1885,d]]'>
<td>[[lotserialno]]</td>
<td><xmod:Format Type="Date" Value='[[transactiondate]]' Pattern="MMM d, yyyy" /></td>
<td>In Warranty</td>
</Case>
<Case CompareType="date" Operator="<" Value='[[TransactionDate]]' Expression='[[DateAdd:-1885,d]]'>
<td>[[lotserialno]]</td>
<td><xmod:Format Type="Date" Value='[[transactiondate]]' Pattern="MMM d, yyyy" /></td>
<td>Warranty Expired</td>
</Case>
<Case CompareType="numeric" Operator=">" Value='[[Url:serialno]]' Expression="500000">
<td>[[Url:serialno]]</td>
<td>Build Date Not On File</td>
<td>In Warranty</td>
</Case>
<Case CompareType="numeric" Operator="<" Value='[[Url:serialno]]' Expression="500000">
<td>[[Url:serialno]]</td>
<td>Build Date Not On File</td>
<td>Warranty Expired</td>
</Case>
<Else>
<td>No Record Found</td>
</Else>
</xmod:Select>

7 Replies

Loading replies...