Need Answer

Using an if statement to set the value of an attribute

Hi,

I am having some problems with the below expression (on exit of a form) - while the error message is being displayed correctly, the 'bQuotesVariable' field is not being updated - any ideas on what could be going wrong would be appreciated

var Count = <count(mCPX.xCAPEXQuotes)>;

var Cost = Me.getXPath("mCPX.fCostinGBP");

if ((Count <1 && Cost <=1000)||(Count <2 && Cost >1000 && Cost <10000)||(Count <3 && Cost > 10000))

{

<mCPX.bQuotesVariable> = true;

CHelper.ThrowValidationError(Util.GetMessage(Me,41));

}

Thanks

Amber

Comments (3)

photo
1

Dear Amber,

The expression seems to be correct. Can you please attach a screenshot of your data model? Thanks!

Best Regards.

photo
1

Hi,

Please find data model attached

Thanks

photo
1

Hi,

Please can I have an update?

Thanks