on 11-10-2008 1:02 PM
I've created a form that allows a user to search for customers and also add them. When the form is in Find Mode I need it so that once the user has entered all of the search criteria and clicked on the Find button that the BP Search form 10001 is shown displaying the results.
The problem I am having is not with populating the data but getting the form to show when I want it to. Is there any way that I can get the form to show containing the search results without clicking on a Choose From List button, which is the only way I have experience of doing it.
Thanks
Hello Steven,
Then how would you like to trigger to show the form? What is expected for the user to do, then the form is displayed? Thanks.
Kind Regards
-Yatsea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Once the find button is pressed I have code that creates an SQL query which it uses to check for any matches within the database with the user's request. If there is more than one result then the results should be shown in the 10001 form allowing the user to choose the one they would like to output on the form.
Hello Steven,
Now I understand the scenario now, atually you can set the condition for ChooseFromList (Form 10001)
but SQL is not allowed to set the choose from list. Here is the sample code:
If pVal.FormType = 134 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.Before_Action = True Then
If pVal.ItemUID = "1" Then
Dim oForm As SAPbouiCOM.Form
oForm = oApp.Forms.Item(FormUID)
If oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE Then
Dim oCons As SAPbouiCOM.Conditions
Dim oCFL As SAPbouiCOM.ChooseFromList
'You may need to check the UID for BP choose List here
oCFL = oForm.ChooseFromLists.Item("1")
oCons = oCFL.GetConditions()
'Note: Add the condition only once.
If 0 = oCons.Count Then
Dim oCon As SAPbouiCOM.Condition
oCon = oCons.Add()
oCon.Alias = "Cardcode"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C0001"
'Set your own condition here instead of the system conditions
oCFL.SetConditions(oCons)
End If
End If
End If
End If
Kind Regards
-Yatsea
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.