ModuleNameClientVariables.getClientVariableName(...).times is not a function

Hi, I keep getting the follow error popup message while trying to run my calculator app at its last step:

"ModuleNameClientVariables.getResult(...).times is not a function"

This is very weird and not helpful, because my syntax is correct and I have 0 errors. This happens in the assign tool where I give the "Result" client variable a value, expressed as a mathematical operation of other variables, such as:

(Client.MVatDisposalDate - Client.MVatDisposalDate * (Client.ActualPropDateAcqIndex / Client.DisposalDateIndex) - Client.TransferFees - Client.Commissions - Client.StampDuty - Client.InterestExp - Client.OtherExp - Client.LossBF) * 0.2

All of those client variables were already given values by the user, and the expression editor says the expression is ok.

Any ideas?

Hi Akis,


It would be helpful if you could tell us a bit more information. Specifically: 


  • Version of the platform

  • Version of Service Studio

  • Is this web, reactive  or mobile?

  • If there is an error message, please provide the FULL error message from service center or a screen shot.

  • If you are using one of the provided UI frameworks, please let us know which one.

    • What version of that UI framework?

  • Uploading a sample OML file will REALLY help out.

    • Ideally, keep the sample OML as simple as necessary to illustrate the issue or question.

  • If you can’t upload a sample, provide screenshots showing as much information including the properties windows of the widgets/etc in question.



Thanks,


Stacey

Solution

Stacey Levine wrote:

Hi Akis,


It would be helpful if you could tell us a bit more information. Specifically: 



  • Version of the platform

  • Version of Service Studio

  • Is this web, reactive  or mobile?

  • If there is an error message, please provide the FULL error message from service center or a screen shot.

  • If you are using one of the provided UI frameworks, please let us know which one.

    • What version of that UI framework?

  • Uploading a sample OML file will REALLY help out.

    • Ideally, keep the sample OML as simple as necessary to illustrate the issue or question.

  • If you can’t upload a sample, provide screenshots showing as much information including the properties windows of the widgets/etc in question.




Thanks,


Stacey

Hi Stacey, this was on reactive. The message I pasted above was the full error message. And I'm not using any UI frameworks other than the default. I have since solved the problem however though after trial and error to isolate it. It seems the issue was subtracting a decimal from an integer. As soon as I changed the first variable to decimal too the error stopped showing up. Though  I wouldn't have thought that this should be causing any issues, as long as the variable that gets this value in the end is also a decimal. Can you confirm that you CAN'T subtract decimals from integers?


Solution