No undefined variables have been added to Variable list
Hi All,
How do we dynamically add people to a group using variables returned from a query?
This error comes up often, it's not super clear what it means but I've gathered it's when an action requires a fixed input. Same for "Email a Person" or "Shard a Card"
Best Answers
-
You would map the output from the "New Users" step a variable, and you would then pass that variable in here.
So go to the "New Users" step, on the output select "Create Variable and Map". If you setup your step correctly, it should create a list of variables that is a person. You can then pass that in as an input to this function.If you haven't done so yet, I'd encourage you check out the "Getting Started with Workflows" training at learndomo.domo.com. It goes into detail on how inputs and outputs work, and how you pass data through variables like this.
0 -
Quick summary of the less intuittive aspects well-explained by Dan:
Data types are configurable in the SQL Query per columnThis is how you assert for a "person" (see user id)
The current row object then becomes it's own module so when you select take action see below this then accepts the currentrow.variable rather than result.variable
You can reference different versions of the same workflow, which allows for breaking the workflow down into multiple parts particularly useful for User actions that may require a user's response:
CAVEAT: This means, after deployment, if you need to edit a sequenced step you'll have to create and deploy a new version of every step prior and re-link them within the StartWork function which is a pain (correct me if I'm wrong @DanHendriksen)@DanHendriksen I've not done this justice so feel free to add anything but also this would be a huge gap-filler as a walk-through on the workflows playlist (Youtube). Thanks for the help!
1
Answers
-
@NateBI - sorry you're having an. issue.
In the query field, on the right hand side, define your output as persons. FYI - a person is a user ID. So if your query were something like "SELECT USER_ID FROM DATA", then the output will be a list of strings. Change the output type to a list of persons using the menu on the right.
In the Domo Groups package, there is an "Add People To Group", that takes a list of persons/people as an input, as well as the group.0 -
Hi @DanHendriksen , thanks but not sure where this output is?
0 -
You would map the output from the "New Users" step a variable, and you would then pass that variable in here.
So go to the "New Users" step, on the output select "Create Variable and Map". If you setup your step correctly, it should create a list of variables that is a person. You can then pass that in as an input to this function.If you haven't done so yet, I'd encourage you check out the "Getting Started with Workflows" training at learndomo.domo.com. It goes into detail on how inputs and outputs work, and how you pass data through variables like this.
0 -
Hi @DanHendriksen ,
Yep this is already the case:However, when I select the custom to insert this variable it doesn't give me the option to select the variable:
I thought the issue here may be that you've said "a list of variables" i.e data type = list whereas this has text (ABC). However, the same applies for the "Loop Over Dataset" template which returns a list of the first row:
In this case the Query with SQL does not return a result object of the dataset with each field as a variable.
The documentation is pretty confusing, The core flow of inputs to outputs seems to change based on the action/code function chosen.0 -
You have a list of objects and you need a list of persons. Send me a DM and we can setup a call where I can show you.
1 -
@NateBI - glad you got this up and running. If you have any thoughts/notes to share with the community that would be awesome.
0 -
Quick summary of the less intuittive aspects well-explained by Dan:
Data types are configurable in the SQL Query per columnThis is how you assert for a "person" (see user id)
The current row object then becomes it's own module so when you select take action see below this then accepts the currentrow.variable rather than result.variable
You can reference different versions of the same workflow, which allows for breaking the workflow down into multiple parts particularly useful for User actions that may require a user's response:
CAVEAT: This means, after deployment, if you need to edit a sequenced step you'll have to create and deploy a new version of every step prior and re-link them within the StartWork function which is a pain (correct me if I'm wrong @DanHendriksen)@DanHendriksen I've not done this justice so feel free to add anything but also this would be a huge gap-filler as a walk-through on the workflows playlist (Youtube). Thanks for the help!
1 -
Nate, thank you! Can you clarify the video you think would be helpful? Happy to get it made.
And yes - when you version workflows that start workflows it has a cascading effect. You always start with the last one, get it deployed and then work your way back. We have plans to make this easier down the road.0 -
Great news @DanHendriksen.
In summary the video could touch on identifying the data structure returned, and identifying the data type required.For example, the SQL query function returns optional outputs a list or rows and then for each feature it could be TEXT, INT, PERSON etc.
The conditional input requires the list object. for the calculation (see image)
The send email function requires a Person - which must be a user_id (not an email for example)
It's the type of detail I miss when say I've re-written the query and have to link all the variables again. Say on an IDE it would be obvious since they'd grey out or underline in red, but these are hidden in the pannels so you have to know that "Yes" requires that variable 'Result' in this case.Another example is breaking the object into child properties for the "currentRow" object 😅 I'm remembering them as I rebuild this!
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 305 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 107 SQL DataFlows
- 648 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 774 Beast Mode
- 75 App Studio
- 43 Variables
- 733 Automate
- 186 Apps
- 471 APIs & Domo Developer
- 62 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 403 Distribute
- 117 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 137 Manage
- 134 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive