Hello everyone. I have a chained application where I need to take a constant found in the first analytic app,and pass it through to the second application.
In the example I have attached, I want to pass the user defined Constant of "ConnectString" into the second app, however when I try it doesn't recoginize the value (because it was defined in the first app).
Any help would be appreciated! :-)
Solved! Go to Solution.
Hi @bsharbo,
I don't believe that there is a way to pass a constant contained within one workflow into another. Even though they're chained, both Apps are still separate files/.yxwz's.
The attached is my best assumption of what you may be trying to do. If this does not work, if you'd be able to provide a bit more detail as to why the constant value needs to persist throughout both apps (i.e. what impact will that value have on the second app), that may give me a better idea on what the best solution may be.
Sure. I use alteryx as an ETL tool, and I have a chained application that sits on the gallery that takes user input in teh first app, reads / writes to a database, and then passes that information into the second app. That all ALSO read / writes to a database. In total the app has over 20+ read / write input / output tools.
Following a commonly accepted ETL standard, my team does all of its development pointing to a development server. Then when things test out correctly we point the flow to a production server.
I was hoping to solve this with one "global" constant variable somewhere in the application where I could change the name of the connection from "DEV" to "PRD",and that way I didn't have to update 15 tools.
This works great if all of my sql inputs / outputs are in one workflow, but in my instances they are spread across 2 chained apps and over 10 macros (it looks like constants don't pass into sub macros either).
I basically need one place to be able to change a connection string at a "project" level....
Is there any way to include some kind of configuration file with an application to accomidate this? :-)
Thanks!
I have not tried using Aliases within an App, but would think that it would work the same way. If it does, seems like utilizing the Alias functionality would get you what you need.
Thank you, @bsharbo, for the explanation.
Yeah, constant variables aren't going to be your solution in this case since they dont persist into chained apps or the macros nested within them. Some tools that you can explore to give your app a more dynamic element would be:
If you're able to share your packaged app including your macros, or DM to me if it's not something that can be shared publicly, I can review it a bit more to see what other options may work better. It doesn't need to include data... primarly want to see the workflow.
Best,
JGo
Hey RodL.
I tried and it does look like Alias's do pass through chained applications and also through to macros. however you cannot save an app using an Alias through to the gallery....
Do you have any info on how to set up a similar Alias on the gallery / server so that I can use alias's so solve my problem. They are basically exactly what I am looking for :-)
Hmm...I was able to create a simple (Input & Output) workflow that uses an Alias for the Input, turned it into an App and saved to my private gallery (all on a single machine...since that's what I have to work with ). It then ran successfully.
Since I assume you are setting up on different machines (designing on a workstation and then saving to a server), you would need to set up the same Alias on the server in order for it to recognize it, but I believe that would allow it to run as a published app.
You might want to check the following KB article which is somewhat related...DSNs and Aliases need to be consistent on any machine using one...
Ah so it sounds like to set it up on the server I ened to log into AlterYX desktop ON THE SERVER itself...
Okay that was the part I was not super clear on. I will give that a try and let you know if it works for me.
Yes, so any DSN or Alias that is used by any of the apps needs to be set up locally on the server (and they should both be set up as "System" connectors).
The other issue that comes into play sometimes is whether someone running an app has access to the database being queried (or file directories within a network).
So luckily our server appliaction is set up to run under a service account that should have access to the databases that I am having the application access :-)
When you say "And they should be set up as system connectors" what does this mean? In the alias manager I am using an oleDB connection on my local desktop version of alteryx (my connection string is below with a changed server / database name).
So i went into the server and set up the connection the same way I did on my local desktop (and called it the same thing) and it is working, so hopefully I did it correctly. Here are the exact steps I took to get it to work.
I set it up by logging into our server under our service account and then going to options > Advanced options > Alias Manager > Standard Connections.... I then set up a connect named EditChecks (my alias). This is the exact same alias name as on my local machine.
I didn't see any options for "system connector" or anything like that however, so did I miss something?
I realize this is very hard to follow over a forum, so if you are curious I would be able to hop on a web-ex to show you in more detail!