home *** CD-ROM | disk | FTP | other *** search
- (*
- A function that lists using one key but returns a field other that the
- Key Field. Use this in the Error Message associated with a "found()" in
- the Validation Expression.
-
- Example call :-- listOther(2,1,{2.CODE_DESCR},{})
-
- This will list file "2" using key "1" to sequence the records. When the
- user picks from the list the description from the code file,
- "{2.CODE_DESCR}" is placed into the current field, "{}".
-
- Example call :-- listOther(2,2,{2.CUST_ID},{})
-
- This will list file "2" using key "2" to sequence the records. When the
- user picks from the list the customer id. from the code file,
- "{2.CUST_ID}" is placed into the current field, "{}".
-
- *)
-
- strptr listOther(int fno, int kno, string fromFld, string toFld)
- {
- uchar dummy[81];
- string ts;
- int savelen;
-
- savelen = strlen(toFld);
- strcpy(ts,"");
- list(dummy,fno,kno,ts);
- strcopy(ts,fromFld,0,savelen);
- pad(ts,ts,savelen,Right);
- strcpy(toFld,ts);
- return(dummy);
- }
-