Custom Function:  ValueListIndex

Document created by David Moyer on Aug 31, 2016Last modified by David Moyer on Dec 20, 2016
Version 4Show Document
  • View in full screen mode

Hi,

Given a value list and a value in the list, this function returns the row number (one-based) of the value.

 

example usage:

$list = ValueListItems ( Get ( FileName ) ; "ColorList" )

$row = ValueListIndex ( $list ; "Red" )

 

 

 

Let(

  [

    padList = "¶" & valueList & "¶";

    padValue = "¶" & valueToFind & "¶";

    start = Position ( padList; padValue; 1; 1 );

    topPortion = Left ( padList; start )

  ];

  PatternCount ( topPortion; "¶" )

)

Attachments

    Outcomes