Condition for Select Columns

Is there a way to Select Column based on a specific value existing in a row from a different column?
For example:

  • If column A contains “Hello World” Select Column A, B & C; Else Select Column A & B

Hey @Sam_Briones :wave:

While there’s no clean-and-simple solution for this use case, I was able to mock out an example using your sample data. You can paste this example directly into your flow using the snippet at the bottom of the post.

  1. Input Data

Screen Shot 2021-10-28 at 6.42.15 PM

  1. Insert Row Numbers: This helps facilitate the table flip in the next step

Screen Shot 2021-10-28 at 6.43.13 PM

  1. Flip Table: This enables us to apply if/else logic in the next step

Screen Shot 2021-10-28 at 6.43.47 PM

  1. Insert If/Else Column: If the specific column of interest (based on the value in “Row Number”) contains the value of interest (ex. Hello World), then set the column value to ‘Yes’.
  • If there is another column that should always be kept regardless of conditions (such as column B based on your example), set that value to ‘Yes’ as well

  1. Flip Table:

Screen Shot 2021-10-28 at 7.56.57 PM

  1. Rename Column: Here, you want to modify the name of the column that should be conditionally included

Screen Shot 2021-10-28 at 7.57.45 PM

  1. If/Else: Here, we recreate your conditional column. If your column of interest has the value ‘Yes’ in the ‘Meet Criteria?’ row, it will put a ‘Yes’ in the column. We also say ‘If C1 is not blank, set the new column value to C1’ so that the new column retains the values from your original column.

  1. Flip Table

Screen Shot 2021-10-28 at 8.01.17 PM

  1. Filter Rows

  1. Flip Tables: with that, the use case is complete!

Screen Shot 2021-10-28 at 8.02.37 PM

Definitely realize that this isn’t the simplest workaround, but unfortunately this is a tricky Parabola use case! If you’d like to paste these steps directly into your flow, feel free to paste this snippet into your flow: parabola:cb:aef34464960b4e03b1b38fff2489917a

Let me know if you have any questions and how it works out!