How to calculate formula from text variable.

Hi all,

I want to calculate formula from text variable. User insert formula in a text box using this text formula needs to calculate in NAV 2016. Basically previous versions we use Microsoft Script Control 1.0 Automation but in NAV 2016 it is not available. Please suggest answer for this.

Field 1 := 50

Field := 2

Formula := (Field 1 * Field 2 )/5;

Field 1 - Decimal

Field 2 - Decimal

Formula - Text(250).

I want to calculate formula.

Hi Kals,

I’m not sure exactly which methods you are using, nor have I been using the Script Control OCX myself. But I would imagine that Microsoft, just has they did with most of their other “common” automations, have created a dotnet control, which can be used instead.

And if I’m not mistaken, then Microsoft’s Script Control Class, replaces their Script Control automation.

I have upgraded a few solutions build with Microsoft’s XML OCX, and upgrading them to use the DLL was quite easy, most of the methods were exactly the same. Not sure if that’s the same with Script Control.