I have a question on the data navigation using the browseby function. From what i know, you have to link it to a column in a table and it will auto navigate all the items there. Just say if i want to browse by a particular sales employee, how would i use the browseby function? For example i have 2 sales employee, and i want that sales employee to only navigate records created by him/her how would i do it?
I think in that case it won't be a browse by function, but rather a condition on your dbdatasource. The browse function is looking for something, like a primary index or unique key to browse the records by. Look at the condition example in the help file, it is fairly comprehensive.
Hope it helps,
This is my exact code
Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
If SBO_Application.Forms.ActiveForm.UniqueID.ToString = "QPT_SITfrmR" Or SBO_Application.Forms.ActiveForm.UniqueID.ToString = "QPT_Sitfrm" Then
If pVal.MenuUID = "1288" And pVal.BeforeAction = False Then
Dim oDBDataSource As SAPbouiCOM.DBDataSource
Dim oConditions As SAPbouiCOM.Conditions
Dim oCondition As SAPbouiCOM.Condition
oConditions = New SAPbouiCOM.Conditions
oCondition = oConditions.Add
oForm = SBO_Application.Forms.ActiveForm
oCondition.BracketOpenNum = 1
oCondition.Alias = "U_Branch"
oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCondition.CondVal = "Branch1"
oCondition.BracketCloseNum = 1
oForm.DataBrowser.BrowseBy = "28"
OSIT is a custom UDO
I am trying to navigate the record where the branch = branch1 but it seems that it wont navigate past the first record
The browseby itemuid is pointing at the branch edittext field. Should i point it at the docnum field? What is the prupose of the browseby when there is a condition.