2 Replies Latest reply: May 17, 2012 2:29 PM by stepheng RSS

    Expression-based Search String in Select In Field Trigger

      Qlikview newby here.  I have a trigger that is tied to the OnActivateSheet event.  It uses a "Select in Field" action that selects a value from a field (Location), but currently the search string is hard-coded.  Using the hard-coded search string, the trigger works as expected.  What I want to be able to do is write and expression that gets the first (alphabetically) Location in the data, rather than hard-code the search string.  So, if I have Locations A, B, and C, I want the expression to return A.  The next time the data is loaded, there may not be an A value in the data.  If the values are B, D, and E, I want the expression to return B.  I have tried a number of expressions to try to get the first value, but have not been successful.  I come from a background where functions like Min would normally return the value I'm looking for, but MIN seems to only apply numbers or dates in QlikView, and MinString seems to apply only in a chart context.  Any suggestions?