Parameter | Description |
---|---|
iFile | Table number to find |
iField | Column number to find |
Function SelectBestColumn Integer iFile Integer iField Returns Integer
Call: | Get SelectBestColumn iFile iField to IntegerVariable |
SelectBestColumn is used to by relational prompt lists to determine which column best matches the binding data for the invoking data entry object (DEO). It does this by searching for a column that has the same binding table and column values that were passed to the function. If it cannot find a match, it returns -1. You can use this and other conditions to determine which column should be used as your update column.
Procedure Prompt_Callback Integer hoPrompt Integer iCol WebSet peUpdateMode of hoPrompt to umPromptValue // get best column for customer.name Get SelectBestColumn of hoPrompt Customer.File_Number 1 to iCol If (iCol=-1) Begin Move 0 to iCol // if no good column, use 0 End WebSet piUpdateColumn of hoPrompt to iCol End_Procedure