While a code stage might be the easiest way of going about this, I believe this is doable with the Utility - Collection Manipulation actions. Broken down into two parts, the first part will filter the rows, and the second part will filter the columns.
To filter the rows:
1. Call the Get Collection Fields action.
You should now have a collection containing the column names. If we use the example collection in your other post, this new collection would contain three rows with "Column1", "Column3" and "Column2".
2. Loop over the column names. Using a text data item, concatenate the column names with a filter for 'O' and add an OR.
After this step, you should have a big honkin' text data item that contains text that looks like this:
[Column1] = 'O' OR [Column2] = 'O' OR [Column3] = 'O'
3. Call the Filter Collection action, passing in the original collection and the filter from step 2.
After this step, the collection should be filtered so it will only have rows with 'O' as a value.
To filter the columns:
1. Loop over the column names again, then:
2. Filter the collection using just the individual column name (so [Column1] = 'O').
3. Count the number of rows. If the row count is zero, then that column does not contain any rows with 'O'. Call the Delete Field action to remove it.
If you run both parts, you should have a collection containing just columns that contain the letter 'O' in one of their rows, and only rows that contain the letter 'O' in at least one of their columns.
------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------