Hello,
I need to search for a value in all fields of the record, because I don´t know the concrete field to look for.
Is there a way to search a value in the entire contents of the fields of the record?.
Thank you. ![]()
Hello,
I need to search for a value in all fields of the record, because I don´t know the concrete field to look for.
Is there a way to search a value in the entire contents of the fields of the record?.
Thank you. ![]()
function FieldContaining( oRec, cText )
cText := Upper( AllTrim( cText ) )
return FieldName( AScan( oRec:aData, { |a| cText $ Upper( cValToChar( a[ 2 ] ) ) } ) )Mr. Nages,
Thank you. The function always returned me blank, but I modified in this way:
function FieldContaining( oRec, cText )
return ( AScan( ArrTranspose( oRec:aData )[ 2 ], { |a| cText $ cValToChar( a ) } ) )
So, I check if its 0 (not found) or > 0, found.
Thanks ![]()