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

[Feature Request]: Two or more variables inside formatters call #65

Closed
Alexpelillo opened this issue Jan 20, 2020 · 3 comments
Closed
Labels
P: High S: work in progress T: enhancement Functionality that enhances existing features

Comments

@Alexpelillo
Copy link

Problem to solve
Please, I want the ability to write a formatter like a compare function, which I enter two of my aliases (currently you can only enter ONE alias which is data) and return a simple compare and return function.

I'm trying to make it with MS Word or LibreOffice Writer's "IF" Functions but they don't work at all.

@steevepay
Copy link
Member

Hello @Alexpelillo,
It is not possible yet to pass variables as parameters to a formatter. It is on our 2020 roadmap, I can't tell you yet a specific date. I'm going to set the priority higher for this feature due to the increasing demand ^^.
If you can't wait, feel free to fork and contribute :)
Thanks for you message!

@steevepay steevepay added P: High S: on hold The issue is on hold until further notice T: enhancement Functionality that enhances existing features labels Jan 20, 2020
@steevepay steevepay mentioned this issue Jan 21, 2020
21 tasks
@steevepay
Copy link
Member

Hi @Alexpelillo, Carbone accepts dynamic variables in all formatters! Carbone passes data to formatters if parameters start with a dot . and is not surrounded by quotes, example: {d.subObject.qtyB:add(.qtyC)}. For the moment, the website documentation is not up to date, check out the changelog with the examples: Changelog
It is only a beta and available on the v2 branch or NPM: npm install carbone@2.0.0-beta.0

@steevepay steevepay added S: work in progress and removed S: on hold The issue is on hold until further notice labels May 14, 2020
@steevepay
Copy link
Member

The feature has been published on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: High S: work in progress T: enhancement Functionality that enhances existing features
Projects
None yet
Development

No branches or pull requests

2 participants