Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculated fields #154

Closed
david-strejc opened this issue Jul 8, 2016 · 10 comments
Closed

Calculated fields #154

david-strejc opened this issue Jul 8, 2016 · 10 comments
Assignees
Milestone

Comments

@david-strejc
Copy link

I've never seen such a great software as yours and I am in business for 12 years!

Great job!

Do you plan adding "calculated" fields? By this I mean having opportunity to have operators between my custom entities - for example I can design that field Cost has operator "+" to Internal Expenses.

Am I clear enough?

@yurikuzn
Copy link
Contributor

yurikuzn commented Jul 8, 2016

Hi David,

Yes. We planned. But have not determined when we will implement it. We have a lot of work to be done in our road map.

If you have any ideas how editor should be designed in UI please share.

@david-strejc
Copy link
Author

Do you have Roadmap accessible anywhere online?

So I won't propose any planned features.

@david-strejc
Copy link
Author

You can start with absolutely simple design:

Int field will have option to add operator and ability to say which other int field should be operated. (Basically you will than calculate result)

In UI it should be simple:

Int Field1 "Which operator to apply" Int Field2

@yurikuzn
Copy link
Contributor

yurikuzn commented Jul 8, 2016

Roadmap is not available.

@yurikuzn
Copy link
Contributor

Planned it for 2016 Q4.

@yurikuzn yurikuzn self-assigned this Sep 21, 2016
@eymen-elkum
Copy link
Contributor

eymen-elkum commented Sep 22, 2016

Hi @yurikuzn ,
I will work on a new field type named Calculated Field, and it is related to this, I can make it as PR if you want

@yurikuzn
Copy link
Contributor

We already have some code written.

@yurikuzn yurikuzn added this to the Version 4.4.0 milestone Dec 15, 2016
@yurikuzn
Copy link
Contributor

yurikuzn commented Dec 29, 2016

In entity manager it's possible to define formula for specific entity type. This script is executed every time before record is saved.

Examples:

amount = product.listPrice - (product.listPriceConverted * discount / 100.0);
amountCurrency = 'USD';

someField = string\concatenate(firstName, " '", middleName, "' ", lastName);

ifThenElse(
  entity\isNew() && status == 'Planned' && dateStart == null,
  dateStart = datetime\addDays(datetime\now(), 10),
  ifThen(
    status == 'Held' && dateStart == null,
    dateStart = datetime\now()
  )
);

@alasdaircr
Copy link
Contributor

What language is this written in?

This will be an amazing feature. Looking forward to it.

@yurikuzn
Copy link
Contributor

It's a simple language designed specially for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants