6 Replies Latest reply on Jun 5, 2019 4:22 PM by LJ LongWing

    Find the position of the cursor inside a character field

      Share This:

      I'm building my own query-builder on a form with all the operator buttons, a "fields" menu, etc.

       

      When you click one of the operator buttons or select a field or a keyword from the fields menu, it adds the corresponding value to the end of the search string.

       

      I'm pretty sure that the answer to this is "no" because I've been doing custom Remedy app development for a long time and I've never seen it before, but sometimes they sneak new features in a release and I miss it.

       

      What I want to do is, if the user has the cursor in the middle of a string instead of at the end of the string, the button or value would be inserted where the cursor is instead of at the end.

      For my menu, I would have to have the menu on another fields obviously, and then use an active link.

       

      Is this possible currently?

       

      If not, perhaps a keyword could be added called $CURSORPOSITION$ or something like that? It would return an integer for how many characters were to the left of the cursor.

      The way I would use that would be:

      1. Set the LEFT('Query String',$CURSORPOSITION$) to a temp field
      2. REPLACE('Query String',LEFT('Query String',$CURSORPOSITION$),"")
      3. Set 'Query String' = 'Temp Field' + Operator + 'Query String'

       

      Any insight or advice is appreciated.

       

      Thanks.