Alteryx Designer Desktop Discussions

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

Preserve column names when renaming dynamically without user input in analytic app

matbae
6 - Meteoroid

Dear Community,

 

I have created the following workflow within an Analytic app to dynamically let the user rename selected columns, see below.
It works as well as soon as data is entered via the GUI.

 

However, I would like the column names NOT to be renamed when no fields are being picked.

Currently, the columns are changed to RenameFieldToThisName1, 2 etc when there is NO USER INPUT, see screenshot.

Alteryx_Community.png

Of course the workflow should still work as before when the user selects the fields for renaming in the GUI.

Any kind of solution is welcome, possibly through the use of filters?

 

THX!

3 REPLIES 3
DataNath
17 - Castor

Hey @matbae if I'm understanding the request here correctly, would something like this work for you?

 

DataNath_0-1668528121255.png

 

I've added a detour so that, by default, the app/workflow will run with the standard 'RenameFieldToThisName' rename:

 

DataNath_1-1668528202601.png

 

Whereas, if the user selects that they need to provide input, this reveals the other options that I've nested inside within the Interface Designer, and they can then make the relevant changes:

 

DataNath_2-1668528271348.png

Podoseb0
7 - Meteor

You can pass the value from the Text Box tool directly to the Dynamic Rename tool by using the "Q" connector (the black one on top of the tools) and then add an IF statement like this:

IF isempty([#1])
THEN [_CurrentField_]
ELSE [#1]
ENDIF

[#1] being the text box input.

 

I'll attach the workflow as well. Let me know if it helps.

matbae
6 - Meteoroid

Thank you Podoseb0!

Labels