Update Value for Dynamic List on Frequency Table
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello all,
I'm looking to try and feed in an input file dynamically, and select fields dynamically through a List Box to go through a frequency table tool and output as part of an analytical app.
The selecting of the file is no problem, but when trying to update the Frequency Table field selection through a List Box >> Action Tool (Update Value), it doesn't register any change from the initial workflow. I'm thinking it could be a case of needing to Update Value with Formula, but wasn't quite clear to me through the debugging.
Has anyone run into the issue before? Any thoughts would be greatly appreciated!
Solved! Go to Solution.
- Labels:
- Apps
- Interface Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @WillMoore
This one is a little bit trickier cause you have to understand the XML structure of the tool.
Remember, it's all about understanding how the tool configuration is formed, and then playing with formulas to replace it dynamically.
Here's how I'd do it (there might be several different ways, so this is just an idea).
I'd configure the List Box to generate a custom list. And understanding the Frequency Tool configuration, I saw a pattern to select the fields there. It seems this pattern repeats, according to the example you have.
<Field field="Store Num" selected="True" /><Field field="Address" selected="True" /><Field field="City" selected="True" /><Field field="State" selected="True" /><Field field="ZIP" selected="True" /><Field field="County " selected="True" /><Field field="Region" selected="True" /><Field field="Total Sales" selected="True" /><Field field="Credit Sales" selected="True" /><Field field="Total Customers" selected="True" /><Field field="Perf Indicator" selected="True" /><Field field="*Unknown" selected="False" />
So, to generate the custom list, I'd add as a start text - <Field field=" - that's what comes before the first field name (Store Num).
Then, the separator should go all the way until the next field name - " selected="True" /><Field field=" - that's what goes until the next field name (Address).
Then, the end text would be what you have after the last field you can see (Perf Indicator) - " selected="True" />
So basically this is what changes after every call you make. This is the dynamic part you need to replace.
So yes, you're right, I'd use a formula to update the value. And this formula would be this one:
REGEX_REPLACE([Destination], '.*(<Field field=.*Unknown..*)',[#1] + "$1")
I need to change the destination value, replacing everything that comes before the "Unknown" part. So that's why I use this regular expression, so I can make sure I'm replacing the correct values.
Then, you have what you need.
If you need a better explanation let me know. It seems complicated, but like I said, if you understand the configuration of each tool, you can leverage the Action tool to work for you.
Solution attached.
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This was an excellent workaround and really appreciate your response!