The multi field tool makes it easy to carry out a function on various fields. I put it to the test with a weekly challenge and although a very basic use, it was still very useful in understanding its functionality.
You can follow along by clicking on this link to get the data: https://community.alteryx.com/t5/Weekly-Challenge/Challenge-193-Unofficial-Holidays/td-p/500029
The image on the left represents the data input whilst the one on the right represents the output
Here is an image of my workflow that led me there.
You can see from the input that there are many red arrows on the corners of the table. This means that the cell has trailing spaces. Therefore, using the multi field comes in handy to trim these all at once. The field needs to be selected to text and both event and day, including any unknown fields should be ticked if you want to future proof the flow. The expression is very simple: TRIM ([CurrentField]). This will trim the trailing spaces for all current fields ticked above.
Next, we need to covert ‘day’ to a new column – a string to date time format. This automatically configures as DateTime_Out which is fine for now. Looking at the input configuration, we can custom write the date which would be Month dd. This results in a new column with dates. The year automatically comes out as 1400 which is not needed later so can be ignored.
Now, quite simply, we sort. We want these new dates in DateTime_Out sorted in ascending order. This also sorts the other columns to reach our chronological outcome.
Finally, we no longer need the DateTime_Out as it has served its purpose to let us sort. Therefore, a select tool helps us remove this with ease as well as tidying up and renaming event to ‘Holiday’ and day to ‘Day’
This was a pretty simple use case but shows how powerful the multi field tool can be.