Hi All,
I am using table tool to put around 54 conditions using If - else statements for each column. There are around 26 columns where I need to put these conditions.
As this makes the task very lengthy, is there any way to do this process quickly?
For e.g. Can I use macro or any other way to do this?
Unfortunately I cannot share the workflow here.
Thanks,
Rachana
Solved! Go to Solution.
Hi @rachana19
I assume that you are doing this to apply formatting to your table.
If you are trying to apply the same formatting to the whole table, you can do this using the menus at the bottom of the configuration window:
If you need to apply unique formatting to each column or to different groups of columns, then it will depend on what type of formatting you would like to apply.
If you are formatting numbers or adding suffixes to them, it may be easier to do this using one or more Multi-Field Formula Tools before creating your table. If you need to apply a format that can't exist in a number format, e.g. adding a % sign, you can convert to text to achieve this.
If you are applying different background colours or other table-specific formats, unfortunately there is not a quick way around this.
Hi Hannah,
Thanks a lot for quick reply.
I am comparing multiple columns in the same row, if match found applying background color green, if no match found applying background color red.
Could you please help with below -
1. Can I use Alteryx macro for this purpose?
2. Can I create excel/vba macro and then integrate with Alteryx workflow?
Thanks,
Rachana
Hi @rachana19
We can't use Excel or VBA macros to affect Alteryx settings, and I can't think of way to do this via Alteryx macro. However, I do have a way to hopefully speed up your process a lot using the XML editor. This method is not automated, but it is a lot more efficient than having to open the 'add rule' dialogue for each individual column.
Please be very careful when editing XML - this should be a 'last resort' option, and you should make sure you back up your workflow before trying.
First, create a rule for one column using your usual process.
Then open the XML editor as shown here - it will open in a popup window:
In the XML code, locate your rule (in the StyleRules section) and copy everything from the opening <Rule> tag to the closing </Rule> tag:
You can now paste and edit this code to add more rules. Make sure you paste it after your previous rule and before the closing </StyleRules> tag.
To add a new rule, you need to edit the following:
Here is an example where I applied the same rule to two columns which I wanted to match (so the formula is identical for each).
You can add as many rules as you want via this method. As an added bonus, the individual rules will still be editable via the usual per-column configuration.
Hi Hannah,
Thanks a lot for going through my request and providing the best possible solution.
Really appreciate patience and detailed response.
Thanks,
Rachana