Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Run Process Conditionally Based on a Passed Value

ricoo
8 - Asteroid

Hi All,

 

I have 2 workflows. The 1st one outputs a value into a .yxdb (dataset.yxdb) that feeds to the 2nd workflow. The values maybe one of the following: “Customer”, “Product”, “Debtor”,etc.

00Dataset_Debtor.png

00Dataset_Product.png

00Dataset_Customer.png

   

On the 2nd workflow I have a set of formulas that have different fields/structure in it that I need to output. These formulas are dependent on the value of the dataset.yxdb that’s being outputted from prior workflow. For example, if the value of dataset.yxdb is “Customer”, then the 2nd workflow should only process the Formula that’s been set-up for Customer.

 

01Customer.png

If the value of the value of dataset.yxdb is “Product”, then the Formula for Product should be outputted.

02Product.png

 

 

The output of these formulas are then appended to my main result.

 

04Append.png

 

I’m thinking of using a Detour Tool, but the Detour Tool needs to be manually ticked/unticked. These workflows are just 2 of the 20 workflows that I’m running sequentially. I set the workflows to run sequentially so that there’s no need for human intervention. Does anybody know a way on how to solve this? Thank you so much in advance!

6 REPLIES 6
flying008
14 - Magnetar

Hi, @ricoo 

 

1- If you use version 2023.x, can use Control-Containers tool to achieve the situation.

2- If you use old version, can made macro like auto-detour tool function to flow your want.

3- Otherwise, use dynamic select + dynamic replace to auto select your field and calculation.

ricoo
8 - Asteroid

Apologies, I can't picture out what you're trying to suggest. Is it possible to be a little more specific? I really appreciate your help

AndrewDMerrill
13 - Pulsar

Here is a sample workflow with macro that should permit you to meet your requirements. When run, it will throw errors. I think it has to do with the lack of data going into the macro, but it does not seem to effect the output. Here is a screenshot of the macro:

Screenshot.png

The workflow itself:

Screenshot Workflow.png

ricoo
8 - Asteroid

Hi @AndrewDMerrill  thank you so much for your suggestion. I'll try your solution and will respond on what findings I have. I'm currently unable to open your package coz Alteryx prompts that you have a more recent version than mine. I can proceed but I'm having an error when I run it. I'm just confirming with my team if it's fine for me to upgrade my version. Once I'll be able to upgrade and test your solution, I'll respond on you.

AndrewDMerrill
13 - Pulsar

Are you having an error that stops Alteryx from working or finishing the workflow? I get 2 errors every time I run this workflow: I think it's because no data goes into the 2/3 macros. Also, nothing in the workflow should be unavailable to you in a prior version.

ricoo
8 - Asteroid

Hi @AndrewDMerrill , my apologies for not being able to respond immediately. I was out of office, and our team just hasn’t upgraded our version yet. And we need to coordinate first when we upgrade our Alteryx.

 

Anyway, I’ve ran the sample workflow you gave me last Friday, but like I said I’m having an error when I ran your workflow. There’s an error that clearly says that the workflow you uploaded is on a more recent version than mine, and there’s another that I’m not sure if it’s related to the version at all.

 

2023-11-29_17h56_34.png




But because of that, I went on developing my own workflow.


Attached is the workflow that I made. I’ve annotated the purpose of the tools so that I could explain it much as I can. Also I wasn't able to mention on my question, but I needed the workflow to not use a macro as much as possible. So this workflow that I made has a bit of complexity in order for it to avoid using a macro.

Workflow.png



But still, thank you very much for taking time on trying to solve my problem. I really appreciate it.

Labels