2 Replies Latest reply on Dec 26, 2012 2:31 PM by MarkB

    GetNextSerialValue is a strange bird.

    MarkB

      Hi All,

       

      I've been playing with the Design function "GetNextSerialValue". I know its 2 parameters must be enclosed in quotes. My question is why doesn't it like the results of the Quote () function.

       

      Let ([

      ~File = Quote (Get (FileName));

      ~Field = Quote (Get ( ActiveFieldTableName ) &"::" & Get ( ActiveFieldName ))

      ];

       

      GetNextSerialValue ( ~File; ~Field)

      )

       

      I can take the exact results from each calculation and place them as literal parameters and all is fine, but the above snipit doesn't produce any result. Either my thinking is wrong (too much holiday cheer) or this function is a strange bird.

       

      Regards, Mark

        • 1. Re: GetNextSerialValue is a strange bird.
          comment

          MarkB wrote:

           

          I know its 2 parameters must be enclosed in quotes. 

           

          No, that is not an accurate statement. The truth is that the parameters must be of type text, as opposed to a reference. If you are using literal text, e.g. GetNextSerialValue ( "YourFile" ; "YourField" ) then of course the names must be enclosed in quotes - otherwise they will not be considered text. If you are using a function that returns a text result, then the result is already text and does not need to be quoted.

           

           

          IOW, try =

           

          Let ( [

          file = Get ( FileName );

          field = Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName )

          ];

          GetNextSerialValue ( file ; field ) 

          )

           

           

          Message was edited by: Michael Horak

          • 2. Re: GetNextSerialValue is a strange bird.
            MarkB

            Thank you Michael. That worked.  Mark