0 Replies Latest reply on Jan 18, 2012 12:22 PM by dzittin

    Find/Replace

    dzittin

      Title

      Find/Replace

      Post

      The built in find replace is neat. It presents a great "quick find" with highlighting.

      I wrote an advanced find which allows the user to enter one or more fields. This find does not highlight fields, it presents found records in a list.

      So, I tried writing a loop that uses a custom dialog to get the search string and stash it in a global variable. I pass this string to perform find/replace followed by another custom dialog that asks if you want to search again or exit. It's great as long as the string is found. The problem is that if the string is _not_ found, I have no way to detect that and I leave the user with no find results and a panel asking if another search try is to be done - not cool.

      I tried get(foundcount) after the find/replace but only get the total number of records. For fun, I tried get(scriptresult) after the find and it returns nothing.

      How can I determine if a find was successful short of doing a perform find just to get a found count before doing my loop?

      (it would be kind of neat if find/replace returned a true or false indicating if the string was found)