Alteryx Designer Desktop Discussions

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

Inherit User Constants Values

terry10
11 - Bolide

 

 

I had a workflow with several separate workstreams in it. The workstreams make use of user constants.

To simplify the parent workflow, we want to convert each of the workstreams into a standard macro.

When a user constant value is updated in the parent workflow, the new embedded macros should use the updated value. 

 

Is there any way to have an embedded macro inherit a user constant from a parent workflow without passing that value through an input anchor?

 

 

 

 

4 REPLIES 4
Qiu
20 - Arcturus
20 - Arcturus

@terry10 

I think it may not work as you wanted.

One workaround is to create an input file containing your constant then read in in the main flow and your macros.
It is not pretty, I know.

 


Constants are global variables for a workflow that are defined on the Workflow tab in the Workflow Configuration window. Constants make it possible to change a value in a single location and have that change apply to the rest of the workflow

 


 

Lamboa01
5 - Atom

Hi ACE Spotlight Series: Jifeng Qiu 

 

Could you please explain this or provide a reference to how you can have an input file containing your desired constants. I have multiple workflows but I would like to only adjust the constants once. 

apathetichell
18 - Pollux

you can use a workflow to edit the constants in the underlying xml of the workflows you want to change. If you are changing a constant you would do use a replace to search for something like this xml string and then update the values inside. You would then save this in your old workflow. This uses this strategy - https://community.alteryx.com/t5/Engine-Works/Dynamic-Hard-Coding-Chained-App-Sorcery/ba-p/764585

 

<Constant>
<Namespace>User</Namespace>
<Name>this_is_a_test_value</Name>
<Value>xml_constant_test</Value>
<IsNumeric value="False" />
</Constant>

 

Qiu
20 - Arcturus
20 - Arcturus

@Lamboa01 
My original idea is in orde to have a global constant across workflows, we would create a input file fo that constance and save it in a accessible location.
then append it to your workflow, which of course would cause flow to be heavier then it should be.

but @apathetichell idea might better.

Labels