on 03-28-2006 3:44 AM
Hi,
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?
Thanks.
Hi Melvin,
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,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey i tried using this code, but there seems to be an error in it.... can anyone troubleshoot this for me?
Also is there a way to search from multiple tables instead of only one table?
oForm = SBO_Application.Forms.ActiveForm
oCondition = oConditions.Add
oCondition.BracketOpenNum = 1
oCondition.Alias = "DocStatus"
oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCondition.CondVal = "C"
oCondition.BracketCloseNum = 1
oForm.DataSources.DBDataSources.Item("ORDR").Query(oconditions)
oForm.DataBrowser.BrowseBy = "8"
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
'oDBDataSource.Query(oConditions)
oForm.DataSources.DBDataSources.Item("@OSIT").Query(oConditions)
oForm.DataBrowser.BrowseBy = "28"
End If
End Sub
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.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The conditions are only for the first record shown in your form, after that if you use the arrow buttons you lost the conditions you set before.
You need to change the conditions everytime the user clicks on an arrow, otherwise you will have allways the same item (the first one of your conditions result)
Regards
Trinidad.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.