Alteryx Designer Desktop Discussions

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

Edit output connection string based on WorkflowName

RafalS
5 - Atom

Dear Colleagues

 

For the past days i am trying to edit connection string in output tool using actions -without any progress.

I tried to use update value with formula similiar to : 

 

if EndsWith('TEST',[Engine.WorkflowFileName]) then

'odbc:Driver={PostgreSQL UNICODE(x64)};Server=xxxx;Port=111;Database=db1;Uid=zzzz;Pwd=__EncPwd1__|||stg.TEST_VARIABLE'

else

'odbc:Driver={PostgreSQL UNICODE(x64)};Server=xxxx2;Port=222;Database=db2;Uid=zzzz;Pwd=__EncPwd1__|||stg.PROD_VARIABLE'

endif 

 

Any ideas how this should be implemented ?

Thanks

4 REPLIES 4
afv2688
16 - Nebula
16 - Nebula

Hello @RafalS,

 

Have you tried adding the output into a batch macro to modify the value? You could modify the whole string and have it that way dinamically selected

 

Regards

RafalS
5 - Atom

can You attach sample WF how this might look like ?

afv2688
16 - Nebula
16 - Nebula

Hello @RafalS ,

 

Here you go 🙂

 

The worklow creates the odbc connection and passes it to the control parameter (¿ input of the macro). Meanwhile the data enters through the normal input.

 

Untitled.png

 

On the macro, the output value is then dynamically altered to fit your specifications. Here as you will see I have the parameters set up for an yxdb file, you would need just to enter any odbc connection on the settings to that the output format is changed. Would recommend using a staging or test odbc connection.

 

Untitled2.png

 

Once the fileformat has been changed there shouldn´t be any issues with the workflow

 

Regards

afv2688
16 - Nebula
16 - Nebula

Well forget about the second part, already modified it for you here 😋

 

Regards

Labels