fieldname

Richard Kreiss rkreiss at gccconsulting.net
Wed Apr 22 12:37:47 PDT 2009


I need to ascertain the field name from the first sort field of a demand index.  I am testing the following code but get a syntax error at fieldname().

Anyone see the problem?


@keyi  ◄ If: '**************************************************************
       Then: '* test ixsort to get sort from index entered
 66  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: declare file
 67  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: file="l_patient_market"{""
 68  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: xx=ixsort(file,"5")
 69  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: fs(3,.0)=mid(xx,"1","3");MSGBOX "The field # is"<fs
70  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: qq =fieldname(file,fs)
 71  -------   -   -  ^ -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: msgbox "Here is the first sort for index 5\n"<qq
 72  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: END

The error shows at the f in fieldname

Now, since I know that the field in question will be either field 14 or field 45, I could just check the value of fs and hard code the field name.  However fieldname() should do this for me so I won't have any surprises.


Richard Kreiss
GCC Consulting
rkreiss at gccconsulting.net
  





More information about the Filepro-list mailing list