135
Views
5
Comments
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?

2025-08-22 10-19-44
Pramod Jain
 
MVP

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 ?

Regards,

-PJ-


2020-01-22 02-22-03
S.Kawaguchi

Thank you for your prompt reply.


I will tell you the imagination I have.

However, I am not good at English, so I will attach a table created in Excel.


Application is  Create entity 2 from entity 1 using the formula for entity 3.

Entity 3 can be edited, added and deleted by the administrator.

The number of entities 2 will always be the same as the number of entities 3.

The last table is the format that is actually displayed on the screen.

2020-11-20 07-43-04
Unnati Khanorkar

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.

Thanks,

Unnati K.

2025-04-22 05-54-18
Shashi Kant Shukla

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.


Regards

Shashikant Shukla


2018-10-29 08-31-03
João Marques
 
MVP

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


Regards,
João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.