A few (hopefully) easy new workflows user questions
We recently added workflows to our instance. I haven't found an answer to a few questions that seem like they'll have easy answers. Sorry if I've missed something obvious! I'll ask the questions first, then provide additional context that can be skipped since I tend to over-explain.
- How do I connect a conditional logic path to an existing shape after I've already created 2 or more conditional paths on that shape?
- How do I get the userID of the user who submitted a form (form created in workflows, not an App Studio form)?
- Can I initialize/assign values/reassign values of multiple variables with a single shape?
- How do I query a dataset to see if something exists to return true if it exists and false if it does not (would result in a "failed" workflow status)?
More details if needed:
- The first 2 paths from a conditional logic flow allow a direct connection to be made to another shape, but after those 2 I'm only seeing the option to create another path which automatically creates a new shape. Deleting that shape deletes the new path.
- I've figured out that a form created in App Studio creates a dataset that I can query, which includes the submitter's ID. I watched the "Getting Started with Workflows" training series, where the 2nd workflow uses a form created from a brick that grabs the "requestor". It seems like there must be a way to get the user info using a form created directly in workflows (code engine .sendRequest maybe?), but my coding skills are only good enough to get me in trouble.
- It's inefficient to create a loop or have a separate shape for each variable that needs initialized/reassigned a new value in the workflow I'm building. Currently using a conditional that checks several fields and reassigns a value if it changed from it's initial value. Mostly an optimization concern for consumption purposes, but it's also time consuming to set up conditionals like I did.
- As a form of data validation, I need to check to make sure a value provided by a user exists in our data before I perform any actions on it. Currently I can only get the result to fail which results in a workflow status of "Failed". I tried using the EXISTS operator, but that is resulting in console errors. Again, my coding skills are lacking.
Thanks!
Answers
-
1 - You can have as many paths as you want out, but it sounds like you only want two. If you want, you can multiple multiple and/or rule sets on one conditional. Just add a new rule, and select and/or. Is that what you're after? Multiple conditions that could send it down the same path?
2 - We need to publish global functions for these, and that is in the works, but you can write a function to get those details. If your function has codeEngine you can codeengine.getExecutionInformation and that will include the user id. Here/s the exact code you need (Javascript), just set the output type to person.
const codeengine = require('codeengine');
function getCurrentUser() {
return codeengine.getExecutionInformation().userId;}
3 - No, not unless they're inside of an object. A function can only have one output, so if you want to return multiple things you could put them in an object, and then define that object (either in the function or by editing the variable) so the individual children can be called directly from later functions.
4 - I would think you could query the dataset with something like a SELECT COUNT(`column`) where CONDITION and then evaluate whether the value returned is >= 1 or if it's 0. That way you're not getting a NULL response.
0 -
Thanks Dan! I'll try these out as soon as I can. I really appreciate how responsive you are to questions on these forums!
Sorry I was unclear with my first question. I'm using a single conditional logic flow shape that has 8 paths out. The issue I've run into is I need to change where one of the paths points, to a shape I've already created. I haven't been able to figure out how to change which shape the output goes to. Clicking the "X" on the output line deletes the output option completely.
When a conditional logic flow is first created, there are options to connect it to another shape. However, once 2 connections have been created, there is only the option to create a new output that automatically adds a new shape.
What I'm trying to do is move the end point from the first screenshot from "Make Fee a Percentage" to a different shape I've already created (not a new one).
0 -
Ah, I get what you're saying. There is no "CONNECT" option on the little plus tab. I'll bring that up with the product team. I suspect for now you'll need to work around by essentially recreating the "Make Fee a Percentage" shape.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 625 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 751 Beast Mode
- 60 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 37 Predict
- 15 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 128 Manage
- 125 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive