Global Type gf_col_exist From function_object
End Type
Forward Prototypes
Global Function Boolean gf_col_exist (Readonly datawindow adw, Readonly String as_colname)
End Prototypes
Global Function Boolean gf_col_exist (Readonly datawindow adw, Readonly String as_colname);
/***************************************************************
gf_col_exist
Checks if a column exists in a DataWindow.
***************************************************************
Arguments:
[readonly/DataWindow] adw: Datawindow to search
[readonly/string] as_colname: Name of the column to search
Returns: boolean
true: Column found
false: Column not found
***************************************************************/
String ls_test
//Check the column.id property.
// Describe returns the number of the column if the column exists.
// Describe returns an exclamation point (!) if the column doesn't exist.
//Check if the column exists...
ls_test = adw.Describe(as_colname+'.id')
Return ls_test <> "!"
End Function
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交