I have create some variables( like “_calc_table”) in my settings.I want use the variable(like v._calc_table) in my task ,but it tell me that " undefined identifier v". How should I do to use my variables
Hello @liuyang0716 ,
Welcome!
Are you expecting your flux variable to return a stream of tables?
Can you walk me through how you created it?
@liuyang0716 ,
I created these two issues that I think might be related to your problem.
I encourage you to give them a look and comment.
opened 05:14PM - 12 Jul 21 UTC
closed 08:37PM - 07 Apr 22 UTC
enhancement
team/ui
**Proposal:**
**Current behavior:**
<img width="896" alt="Screen Shot 2021… -07-12 at 12 08 54 PM" src="https://user-images.githubusercontent.com/30506042/125328654-2e3f2380-e30a-11eb-8f65-8d8d8ef44da0.png">
<img width="726" alt="Screen Shot 2021-07-12 at 12 11 01 PM" src="https://user-images.githubusercontent.com/30506042/125328715-3f883000-e30a-11eb-8e34-701384a591a2.png">
Yields error
` type error @2:4-2:11: expected [A] but found string (argument tables)`
**Desired behavior:**
The ability to call variables directly.
**Alternatives considered:**
Describe other solutions or features you considered.
**Use case:**
Enables code reuse and streamlines flux development.
Related to influxdata/flux#3872
opened 05:10PM - 12 Jul 21 UTC
Users want to be able to store commonly used Flux queries in a variable and call… the variable to yield tables directly.
<img width="896" alt="Screen Shot 2021-07-12 at 12 08 54 PM" src="https://user-images.githubusercontent.com/30506042/125328470-f637e080-e309-11eb-95f0-c351c09160ca.png">
```
v.mytable
```
returns
` type error @2:4-2:11: expected [A] but found string (argument tables) `
I want to use myself variable in my task.In fact, each variable just use in the dashboard with “v”. could not be used in my task .
Is there some method using a variable in my task which I can change values.some like password.
Hello @liuyang0716 ,
yes you can add and store secrets in influxdb please check out this documentation:
As for your issue, can I see how you made that variable?
Do you see your variable listed in the UI?
I can use secrets fine in Books, but when I add secrets in Tasks I get an error regarding the import statement
import “influxdata/influxdb/secrets”
and the secrets don’t work without the import statement either…
ideas?