How can is calculate formulas ,stored in database
Application Type
Traditional Web
Service Studio Version
11.10.0 (Build 34711)

I want to let system administrators to define formula and store in the database. 

How can is calculate formulas ,stored in database dynamically

(formula contains: field names ,functions ,operators and ...) 

Could you help me please?

Rank: #51

Hi S,

What kind of formulas you want admin to configure , are those formulas are dynamic ?
Can admin define any formula and store it in database?

I did one similar implementation but the number of formula were fixed and every formula had one action defined for its calculation in Outsystems.

There were switch case based implementation, whatever formula user selected the corresponding action will get executed with all the required input parameter .

Could you please let me know some more information about your required implementation ?



Hi S,

You can follow below steps -

1. While saving the formulas in DB use the variables as the column names of Entity 1.

2. After retrieving the formulas replace the column names with the values fetched from Entity 1 at run time by using string_replace (may in you can do it in loop on Entity 2.)

3. Assign the values into structure and display on UI.

Let me know if this helps. Or you need any more details.


Unnati K.

Hi S.Kawaguchi,

I did same kind of formula calculations in one of my application. I dont know what is your exact requirement but you should store  field names ,functions ,operators in database and using these you create the formula in screen using screen logic and do the calculation accordingly.

If it is not work for you please explain in detail or share your oml to analyze the problem.


Shashikant Shukla

Rank: #70

Hi S. Kawaguchi,

You can use the Formula Forge component. It has a Try Now option where you can see a demo and download to learn how you can work with it.

Here is a glimpse on the demo where you can add variables on the right and have the formula on the left.

Hope it helps