Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to retrieve the 'name' part of a name-value pair in a dropbox

artzee1556
8 - Asteroid

Hello -

 

I have a very simple app that accepts a file containing a list of name/value pairs and uses it in a dropbox. It is very easy to pull down the 'value' portion of the name/value expression (in a Formula you can simply reference [#1] in a new field and get the data). But in my scenario I need the data in the 'Name' portion of the Name/Value pair. So, for example, if a name/value pair is 'Pick Account / '1246567' I want to be able to pull down 'Pick Account'. The PNG I attached shows the app and the formula you see is what I explained above - it just pulls in the 'Value' side of the Nam/Value pair. I need the date on the Name side. Can this be done?

 

Thanks, Art

2 REPLIES 2
T_Willins
14 - Magnetar
14 - Magnetar

Hi @artzee1556,

 

I don't know of a way to pull down the name from a name/value pair, but if you set up your list in a certain way, there is a way to make it work.  In the list used for the List Box tool, use Name:Name|Value.  Then in your Action tool use Update Value with Formula using the following Expressions:

 

To get the Value:  REGEX_Replace([#1], '.*?\|(.*)', '$1')

To get the Name:  REGEX_Replace([#1], '(.*?)\|.*','$1')

 

The user only sees the Names listed when running the app, but you can then utilize both the Name and the Value in the workflow.  I've attached a sample workflow with how the Action Tool is configured.

 

 

 

artzee1556
8 - Asteroid

Thank you so much T_Willins. It worked like a charm! I get to keep my job...this week. 

Labels