Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create a filter where it will return all results in a table based on whether the value exists in columns A or B. I am not looking to hard code the values in the scripts because I have thousands of rows in the table.
So if I filter for apple, it should return rows 1 & 3.
Row | Field A | Field B |
1 | apple | orange |
2 | pear | |
3 | orange | apple |
4 | banana | |
5 | peach | banana |
HI,
You should create that search field in script to make it more optimized.
So your script should have one more table that is connected to the main table, like below.
Main:
Load *,FieldA&'-'&FieldB as Key from xyz;
SearchTable:
Load Distinct FieldA&'-'&FieldB as Key, FieldA as Search Field From XYZ;
Concatenate
Load Distinct FieldA&'-'&FieldB as Key, FieldB as Search Field From XYZ;
Now you should make selection in Search Field which will eventually select both the rows as per your example.
HI,
You should create that search field in script to make it more optimized.
So your script should have one more table that is connected to the main table, like below.
Main:
Load *,FieldA&'-'&FieldB as Key from xyz;
SearchTable:
Load Distinct FieldA&'-'&FieldB as Key, FieldA as Search Field From XYZ;
Concatenate
Load Distinct FieldA&'-'&FieldB as Key, FieldB as Search Field From XYZ;
Now you should make selection in Search Field which will eventually select both the rows as per your example.
Thank you Kaushik. That worked great!