I'm aware I could make use of loops to solve this problem but I was wondering if there was a function / another way to find matching character values in one row in my data table in JSL?
Any help would be appreciated.
Create a column called RowNum and give it the formula
Then run the Stack Platform
stacking all of the character columns you want to find matches for. Also select the column RowNum to be included in the new data table.
Now run the Summary Platform
Select the column called Data as the Statistics column choosing "N" as the statistic, and then select the column RowNum as the Group column.
This will give you a new data table, where the column N Rows, will indicate the number of matches for each value for each row. Just select one of the cells where only 1 match was found, and right click. Select, "Select Matching Cells". Once all of the matching rows are selected, go to the RowState column, and right click on one of the selected rows. Select "Delete Rows". What is left are all of the rows with matches for values in those rows.
Jim provided an excellent suggestion. Here is another alternative, that uses Combine Columns. From the UI,
N Row( Loc( Words( :Search, "^" ), "y" ) )
Loc( Words( :Search, "^" ), "y" )
Attached is a script that creates a sample table, creates the combined columns, and create the two formula columns for Count and loc