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

no value for $CURRENT_USER #29

Closed
musfandi opened this issue Dec 29, 2022 · 1 comment
Closed

no value for $CURRENT_USER #29

musfandi opened this issue Dec 29, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@musfandi
Copy link

no value for {{ STRING($CURRENT_USER.staff_no) }} and also {{ YEAR($NOW) }} in field ..
using "directus-extension-computed-interface": "^1.4.0",

@duydvu
Copy link
Contributor

duydvu commented Dec 29, 2022

Yeah {{ YEAR($NOW) }} doesn't work because it will only compute when the template uses at least one field. To fix this, I guess it will need to compute initially on mount.

I didn't read the doc carefully so I thought $CURRENT_USER just returns the user's id 😅. Don't worry, should be fast to fix.

@duydvu duydvu added the bug Something isn't working label Dec 29, 2022
@duydvu duydvu closed this as completed Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants