Hi
I' looking for fulltext search function in datawindow. The idea is something similar to Ctrl+F in Excel.
What I do is:
ls_data = datawindow.data //get full data buffer separated with ~t for cols and ~r~n for rows
ll_found = pos( ls_data, ls_lookFor ) //look for abs. position in the buffer
ll_row = of_countoccurrences(ls_data,"~r~n",ll_found) //calculate the row
//calculate the col in the similar way
...
This solution is quick and mostly working. It doesn't work with dropdowns but it's expected and there are mostly no scenarios where you want search in dropdowns. The main problem is that data can contain tabs or end of lines. It's rare but in this case my solution fails.
I've found a workaround. If I add a dummy column as the last column of the datawindow which such unique value then I can count these values follower with "~r~n". It works well but having a solution which doesn't require additional column would be better.
Thanks for the feedback on your decision not to use the Find() command. Your implementation alternative is most interesting.
Thanks for that perspective!
Regards ... Chris