2 Replies Latest reply on Jun 19, 2015 1:22 PM by philmodjunk

    Perform a find on a value list using a variable.

    TimCranwill

      Title

      Perform a find on a value list using a variable.

      Post

      Ive tried all operators with no luck.

      I am trying to perform a find using a variable as the value. Im searching a field with a value list containing multiple values without getting any found results. I know for sure that the variable contains a value that is definitely in the value list im searching. (data viewer)

       

      Please help smiley

       

        • 1. Re: Perform a find on a value list using a variable.
          SteveMartino

          What exactly did you try?  How are things set up?  From where do you get the variable? More details would help.

          Here's a guess:

          I suppose you have a field, that is set up as a dropdown list, attached to a value list-which is available in both Browse and Find modes.  First try this:

          If you enter Find mode, click on the field, select the value you want, perform find--do you get the proper find results?

          If not, something is wrong.  If so, then you should be able to script this fairly easy.

          Or are you trying to say, you want to select a value list item from a dropdown list, then perform a find for that value?  If so, that will get a little tricky because you cant differentiate when choosing a drop down list item if you want to change the data or perform a search.  You could put a button next to the field that would grab that value in a variable, enter find mode, set field, perform find.

          • 2. Re: Perform a find on a value list using a variable.
            philmodjunk

            The fact that the field contains multiple values--such as is produced by a check box set, is probably at least part of the issue.

            Like Steve has requested, we really need to see the details of how you are attempting to script the find as it is likely in those details that we'll find the reason that your method isn't working.

            I generally prefer to use a global field instead of a variable in scripted finds using data input/selected by the user. Not sure if your variable has data specified by the user or not, but if so, you might consider an alternative approach to scripted finds found here: Scripted Find Examples