of_finditem


pfcapsrv.pbl   >   pfc_n_cst_mru   >   of_finditem   

Full name pfc_n_cst_mru.of_finditem
Access public
Extend of long
Return value long
Prototype public function long of_finditem(string,long)

Name Datatype
No Data

Name Datatype
ll_rowcount long
lnv_string n_cst_string
ls_findstring string
ls_menuitemtext string

public function long of_finditem (string as_menuitemtext, long al_start);//////////////////////////////////////////////////////////////////////////////
//
//	Function:	of_FindItem
//
//	Access:		public
//
//	Arguments:
//	as_menuitemtext   text from selected Mru Menu item
//	al_start				row to start search from
//
//	Returns:		long
//	SUCCESS = 1 ; row number found
//	ERROR = -1  ; row not found
//
//	Description:
//	Find menuitemtext in the datastore
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
long			ll_rowcount
string		ls_menuitemtext, ls_findstring
n_cst_string	lnv_string

// check the arguments
if IsNull(as_menuitemtext) or (as_menuitemtext = "") or &
	IsNull(al_start) or (al_start < 0) Then
	return -1
end if

// parse out first space.
ls_menuitemtext = lnv_string.of_gettoken(as_menuitemtext, "  ")

// find row that matches menu item id and pass to user defined process
ls_findstring = "s_menuitemname='" + as_menuitemtext + "'" 
ll_rowcount = ids_mrukeys.rowcount()

// return the row of the item.  negative # if error, zero if not found
return ids_mrukeys.Find(ls_findstring, al_start, ll_rowcount )

end function

     
Name Owner
pfc_n_cst_mru.of_additem pfc_n_cst_mru
pfc_n_cst_mru.of_restore pfc_n_cst_mru
pfc_w_master.pfc_mruclicked pfc_w_master

     
Name Owner
datastore.find datastore
datastore.rowcount datastore
systemfunctions.isnull systemfunctions
pfc_n_cst_string.of_gettoken pfc_n_cst_string

     
Full name
No Data

     
Name Scope
No Data