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

How to overwrite computed value? #62

Open
stx-chris opened this issue Oct 24, 2023 · 3 comments
Open

How to overwrite computed value? #62

stx-chris opened this issue Oct 24, 2023 · 3 comments

Comments

@stx-chris
Copy link

Great extension! I would like to use it to suggest a date one year in the future, given a certain start date. I succeeded in formulating the template, but when I want to overwrite the computed value, it re-computes (and therefore resets) its value on each keystroke.

field: my_date (format: DD.MM.YYYY)
computed field: future_date
template: {{ CONCAT(LEFT(my_date,6),SUM(INT(RIGHT(my_date,4)),1)) }}

e.g.
my_date: 14.03.2023
future_date: 14.03.2024 (computed)
want to overwrite with 15.12.2024

but when I overwrite the computed field, it won't work. Neither does copy & paste. Is there a workaround by any chance?

@yakubovmax213
Copy link

@stx-chris I have created a pull request that should solve this problem. Feel free to use this package as a temporary replacement until the PR is accepted https://www.npmjs.com/package/@yakubovmax213/directus-extension-computed-interface

@stx-chris
Copy link
Author

thx @yakubovmax213 for your reply! Will try

@bogdan-nita
Copy link

is there an update on this issue? i'd be great to be able to overwrite the values once computed

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

No branches or pull requests

3 participants