Okay I Turned ON Debugging and I am getting werid results.
<conditions>
<condition name="WeRequireCarrierPay"
serverTest="val(getCarrierFlat()) eq 0 AND len(getCarId()) eq 0"
clientTest="" />
</conditions>
<contexts>
<context name="Save" formName="TestFrm" />
</contexts>
<objectProperties>
<property name="CarId" desc="Carrier Flat Pay">
<rule type="required" contexts="Save"
condition="WeRequireCarrierPay">
</rule>
</property>
<property name="CarrierFlat" desc="Carrier Flat Pay">
<rule type="required" contexts="Save"
condition="WeRequireCarrierPay">
</rule>
</property>
</objectProperties>
For Now I am ignoring client side just focusing on serverTest
<tr>
<td>
#common.isErrorMsg(validationErrors,"CarId")#
<label
for="CarId">#common.isRequired(RequiredFields,"CarId")#Test</label>
<div class="ctrlHolder">
<input type="text" size="25" id="CarId"
value="#dispatchObj.getCarId()#" name="CarId">
</div>
</td>
</tr>
<tr>
<td class="tableHdrTxt">
#common.isErrorMsg(validationErrors,"CarrierFlat")#
<label
for="CarrierFlat">#common.isRequired(RequiredFields,"CarrierFlat")#Carrier
Flat Rate (Only Enabled When Broker Is Used)</label>
<div class="ctrlHolder">
<input type="text" size="15" id="CarrierFlat"
value="#dispatchObj.getCarrierFlat()#"
name="CarrierFlat">
</div>
</td>
</tr>
What I have is to fields with the same condition
Problem is that Carid runs the condition correct CarrierFlat Does Not
Even Though They are Running the same condition i get two different
results.
Can You Explain Why This Is Happening On Server Side? Its What I Do
Believe Is leading me into these problems where i think my serverTest
code is correct but its not running right. Thanks
On May 3, 11:39 am, John Whish <
john.wh...@googlemail.com> wrote:
> Ah right sorry, you will need to escape the '&' with & Can you try:
>
> <condition name="WeRequireCarrier"
> serverTest="val(getcarrier_flat()) EQ 0 AND len(getcarid()) neq 0"
> clientTest="$([name='carrier_flat']).getValue() == 0
> && $([name='carid']).getValue().length != 0;" />
>
> It does get confusing making it XML safe.
>