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

Using Global Variables inside Fields with JSONata #346

Open
LRagji opened this issue Apr 17, 2023 · 1 comment
Open

Using Global Variables inside Fields with JSONata #346

LRagji opened this issue Apr 17, 2023 · 1 comment

Comments

@LRagji
Copy link

LRagji commented Apr 17, 2023

Repro:

  1. Use a simple stats widget,
  2. Select datasource as JSONAPI
  3. Rhen add this code in field $__from and you can see the time in milliseconds,
  4. Change to this $fromMillis($__from) and the data disappears?

are global variables not supported as function param or am i missing escape character?

@paulinaptf
Copy link

I have a similar issue. I try to use my configured dashboard variable. It shows a correct value when I put it in a field alone. However, it does not work when I try to use it in a JSONATA expression.
I read in the documentation that the dashboard variables are always arrays and because of that it should be used with [] - $myvariable[0]. Unfortunately, then it is not possible to use such a variable in a repeatable raw for Grafana. Or is there any way to do this?

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

No branches or pull requests

2 participants