>>Yes y9ou can do that. However, you cannot ever open that table if tyhe UDF is not visible to VFP as it will cuase an error that will prevent the table from opening. Also, you must insure that the UDF always returns a value of the same type and length or else the index will become corrupt.
>
>What if the udf is a stored procedure?
Albert,
We could go on forever thinking of rare and unusual circumstances under which an index key that includes a UDF call might be beneficial. 1st rule of development, "Never say Never or Always." That said, never put UDFs in an index key expression.