Choose from List Condition - SAP 9.0 visual studio 2010
Hi,
How to set condition for CFL. I am using SAP 9.0 Patch Level 12, Visual Studio 2010. I could find the event, ChooseFromListBefore event. I tried coding as below,but its not working:Got error like "Public member 'GetConditions' on type 'SBOItemEventArgClass' not found."
Private Sub ChooseFromListBefore(sboObject As System.Object, pVal As SAPbouiCOM.SBOItemEventArg, ByRef BubbleEvent As System.Boolean) Handles EditText0.ChooseFromListBefore.
Dim pCFL As SAPbouiCOM.ISBOChooseFromListEventArg = pVal
Dim oCond As SAPbouiCOM.Condition
Dim oconds As SAPbouiCOM.Conditions
' Adding Conditions to CFL1
oconds = pCFL.GetConditions() --Getting error in this line.
oCond = oconds.Add()
oCond.Alias = AliasName
oCond.Operation = Operation
oCond.CondVal = CondVal
pCFL.SetConditions(oconds)
end sub
Any help is appreciated.
Thanks in advance.
Parvatha Solai.N
Hi Parvatha,
The conditions should get from the CFL object it self, not the CFL Event object.
Dim oCFL = oForm.ChooseFromLists.Item("cflUID");
oConds = oCFL.GetConditions();
Regards
Edy
Similar Messages
-
Dear Experts,
i want to select Items in Sales Quotation Screen which is from Particular Group, I'm using following code
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And pVal.BeforeAction = True Then
If pVal.FormTye = "149" And pVal.ItemUID = "38" And (pVal.ColUID = "1" Or pVal.ColUID = "3") Then
Try
oForm = SBO_Application.Forms.ActiveForm
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent = pVal
Dim sCFL_ID As String = oCFLEvento.ChooseFromListUID
Dim oCFL As SAPbouiCOM.ChooseFromList = Nothing
oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
oCons = Nothing
oCon = Nothing
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "ItmsGrpCod"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "100"
oCFL.SetConditions(oCons)
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
End If
First time Its working fine. but i'm selecting the next time in next row or same row its not showing any item. it opens only empty Choose from list. what is the prblm
MathiThe problem is that when this event is called again, the Conditions object still has the conditions from the last call :
oConditions = oCFL.GetConditions(); // this has all the previous set conditions
So the conditions set before are also taken into consideration. What you need to do is :
oCFL.SetConditions(null);
oConditions = oCFL.GetConditions();
This way the Conditions object will be empty. There is no method to remove a Condition from a Conditions collection, so you have to make it null. -
Crystal Report not listed Add New Item for Visual Studio 2010
I just finished installing cryestal report for visual studio 2010.
During the installation a visual studio error dialog popped up "Operation cannot be completed. Access Denied", the crystal report installation continued and was informed that the installation was successful.
But on opening my visual studio project to add new item, crystal report item is not listed there.
Is there anything that needs to be done to get it listed in the Add New Item dialog for visual studio?I wonder what file you ran to install CRVS2010? Was it the MSI as opposed to the actual install file?
The link to the correct install is here:
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_2.exe
Is that the file you ran to install CRVS2010? E.g. as opposed to:
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_2.zip
- Ludek -
Choose From List Condition Problem In Matrix
Hi,
I kept CFL for Vendor listing in matrix but if i press tab in the vendor column the BP form Apperas but both the customer record and Vendor records are coming i want only the vendor records to be listed in the CFL of BP so plz tell me the solution for this.
MadhaviHi,
Use following query...
Select CardCode,CardName,cardType from OCRD Where CardType='S'
CardType : S for Vendor,C for Customer,L for LEAD
Regards
Sanjay -
Choose From List Condition on Detail table field rather than Master table
Dear All,
I have a master detail udo having udts @master @detail
I need to filter my cfl object on bases of field in @detail table.
Can you tell how do I do this.Try
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
oform = sbo_app.Forms.Item("formuid")
oCFLs = oform.ChooseFromLists
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
oCFLCreationParams = sbo_app.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
' Adding 2 CFL, one for the button and one for the edit text.
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = "yourobjectname"
oCFLCreationParams.UniqueID = "CFL1"
oCFL = oCFLs.Add(oCFLCreationParams)
' Adding Conditions to CFL1
oCons = oCFL.GetConditions()
oCon = oCons.Add()
'here which field u want to filter
oCon.Alias = "CardType"
'here condition
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C"
oCFL.SetConditions(oCons)
' oCFLCreationParams.UniqueID = "CFL2"
'oCFL = oCFLs.Add(oCFLCreationParams)
Catch
MsgBox(Err.Description)
End Try -
I can't install MS Visual Studio 2010 ultimate
Hi everyone
I'm trying to install MS Visual Studio 2010 in my laptop, but it get stuck on this point shown in snap shot. I've installed this several times before but now i can't, even I installed my windows again but the problem is same. I'm using windows 7 ultimate.
Please help me if someone knows about it.Hi,
Could you please clarify some information like from where you are installing the Visual Studio 2010 ultimate. Are you trying to use web installer or you downloaded the ISO from Microsoft web site.
If it web installer, It may cause by connection issue during the installation. Please try download the content online or copy the content from your DVD to some folders from your disk, then try the installation again. And try to use the tool in below link
to check your ISO checksum.
http://support.microsoft.com/kb/841290
Then you can follow up the steps in the link to install your VS:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/60f71a54-506e-4c70-be98-e993ce6d1ddf/visual-studio-installation-tips?forum=vssetup
If the error also occurs, please use http://aka.ms/vscollect to gather the installation logs. You will find vslogs.cab from %temp% folder. Please upload the file to
https://onedrive.live.com/ and share the link here.
Best Wishes!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey. -
Choose from list - data display with condition
Hi,
I 've developed a form using screen painter, I ' ve attached a choose from list to fill GRPo Number. In the choose from list the GRPo no. should not display again which once I have selected and saved.
Let me have a good solution please and it would be appreciated.
Thanks & Regards,
Venkatesan G.Hi suresh,
where did you put this code?....In the choose_from_list event handler?..I've tried a similar solution, before reading your post, but it doesn't work because if i dynamically set the condition for the choose from list i got an empty table.
i've tried to put my code when beforeaction=true and i have this kind of problem. The difference is that i need to set the filter starting with the value i've entered on the field connected to the choose from list. I put code here, so it's more clear
If (pVal.Before_Action = True) And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST) Then
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
Dim sItemCode As String
oEditText = oMatrix.Columns.Item("V_ItemCode").Cells.Item(pVal.Row).Specific
sItemCode = oEditText.Value.ToString
oCFL = oForm.ChooseFromLists.Item("CFL_Item")
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "ItemCode"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_START
oCon.CondVal = sItemCode
oCFL.SetConditions(oCons)
End If
My situation is that i type something in V_ItemCode column and after that i press the tab key to open the choose from list.
Would be ok if i get the SAP standard beahviour too, that doesn't open the choose from list, but fills the field with the first code starting with what you type.
Thanks in advance -
Multiple Values For one Condition in Choose From List
I have used one Business Partner Choose From List in my form but i want to give condition in that choose from list on GroupCode .But the condition will have multiple values like 100,102,104 then how i will write the code to incorporate multiple values for one single condition.
Hi,
Check this thread
How to set a Multiple condition in a single CFL
Hope that helps,
Vasu Natari. -
Choose From List From a UDT in SAP Business One 2005 A
Hi All
How to develop a Choose From List from a <b>User Defined Table</b> (not from System Tables) in SAP Business One 2005 A.
I need the Choose From List should display the records stored in the UDT.
Any Idea ?
Thanks in Advance.
Regards.
Asutosh.Hi Asutosh,
You can add a CFL to a User Defined Object, not a simple User Defined Table.
In order to do it you only have to set the object type of the CFL to the code of your UDO.
Here you have a simple:
oCFLCPuo = SB1_App.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
oCFLCPuo.ObjectType = "MY_UDO_CODE"
oCFLCPuo.UniqueID = "UserObjectCFL"
oCFLuo = oForm.ChooseFromLists.Add(oCFLCPuo)
Hope it helps
Trinidad. -
Delete/Edit/Update CFL Conditions - Choose From List
Hi All,
I have a Choose From List of which the conditions are set depending on a ComboBox.Selected.Value
oCon.CondVal = comboboxBranch.Selected.Value
So the Conditions are set when the "OnAfterComboSelect" event is trigered.
How do I reset the Condition when the user "RESELECTS" another ValidValue on that ComboBox???
At the moment, on the Reselection on the Combobox, the CFL is returning EMPTY.....
ThanksHi Michael,
Thanks for the speedy reply. Its workin.
Here's my code for the adding/editing of the Conditions from within the an Event Handler if any1 needs it.
In the OnAfterFormLoad Event Handler:
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
' Adding CFL3 for Line GL Account Name.
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = "1"
oCFLCreationParams.UniqueID = "CFL3"
oCFL = oCFLs.Add(oCFLCreationParams)
In the 1st TabOrder Item's OnGotFocus Event Handler:
oColumn = oColumns.Item("AcctCode")
oColumn.ChooseFromListUID = "CFL3"
oColumn.ChooseFromListAlias = "FormatCode"
In the OnAfterComboSelect Event Handler:
oCFLs = form.ChooseFromLists
oCFL = oCFLs.Item("CFL3")
oCons = oCFL.GetConditions()
If oCons.Count = 0 Then
oCon = oCons.Add()
oCon.BracketOpenNum = 2
oCon.Alias = "GroupMask"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "7"
oCon.BracketCloseNum = 1
oCon.Relationship = BoConditionRelationship.cr_AND
oCon = oCons.Add()
oCon.BracketOpenNum = 1
oCon.Alias = "Postable"
oCon.Operation = BoConditionOperation.co_EQUAL
oCon.CondVal = "Y"
oCon.BracketCloseNum = 1
oCon.Relationship = BoConditionRelationship.cr_AND
oCon = oCons.Add()
oCon.BracketOpenNum = 1
oCon.Alias = "Segment_1"
oCon.Operation = BoConditionOperation.co_EQUAL
oCon.CondVal = comboboxBranch.Selected.Value
oCon.BracketCloseNum = 2
oCFL.SetConditions(oCons)
Else
oCon = oCons.Item(2)
oCon.CondVal = comboboxBranch.Selected.Value
oCFL.SetConditions(oCons)
End If -
Associating a Custome ResultSet with a Choose From List
Hi Experts,
I have to Link the Chose from List with a UDO for accessing the records from the Parent Table /Child Table
How to crack this problem?
Also I have to associate the Results of a custom query in a choose from list so that when I press TAB over a Text Box I get a Choose From List which displays the Results and I could select one of those rows.
Plz Hint me for this ProblemHello,
When you create CFL, just set your UDO type with oCFLCreationParams.ObjectType = "My_UDO", the collumn to be displayed in CFL has been determined by Find Service in your UDO definition.
As per custom query, actually you can set the condition to do so. Direct customed SQL is not supported in CFL. You may refer to the SDK sample for further info after you install SDK component:
<<C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\17.ChooseFromList>>
Private Sub AddChooseFromList()
Try
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
oCFLs = oForm.ChooseFromLists
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
' Adding 2 CFL, one for the button and one for the edit text.
oCFLCreationParams.MultiSelection = False
'Just Set your UDO type.
oCFLCreationParams.ObjectType = "My_UDO"
oCFLCreationParams.UniqueID = "CFL1"
oCFL = oCFLs.Add(oCFLCreationParams)
' Adding Conditions to CFL1
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "CardType"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C"
oCFL.SetConditions(oCons)
Catch
MsgBox(Err.Description)
End Try
End Sub
Kind Regards
-Yatsea -
Hi all,
I am trying to develop a custom choose from list functionality for my addon. I have created two forms first.srf and second.srf .In the key down event of an edittext in my first form i wrote the code for opening the second form
LoadFromXML("Second.srf")
Private Sub LoadFromXML(ByRef FileName As String)
Dim oXmlDoc As Xml.XmlDocument
oXmlDoc = New Xml.XmlDocument
Dim sPath As String
sPath = System.Windows.Forms.Application.StartupPath()
sPath = sPath.Remove(sPath.Length - 3, 3)
oXmlDoc.Load(sPath & "" & FileName)
B1Connections.theAppl.LoadBatchActions(oXmlDoc.InnerXml)
End Sub
second form is loading very well but my problem is that in the form load event of the second form when i try to access the grid i will get an error message
Item - Invalid Item [66000-3]. Form unique Id "Second", Item Unique Id : "grdItem"
I am using SAP B1 8.8 PL 10, visual Studio 2008 and B1DE 2.1.
Any help
Regards
ArunHi Sebastian,
Thanks for your reply. i used
Dim oForm As SAPbouiCOM.Form = B1Connections.theAppl.Forms.GetForm("FrmSecond", 0)
to get the form also tried
Dim oForm As SAPbouiCOM.Form
oForm = B1Connections.theAppl.Forms.ActiveForm
but not working . second forms unique id and type are set correctly but the object type is not set because this form is not binded to any UDT.
The OForm objects item count is always 0
Thanks in advance
Regards
Arun -
Hi;
I would appreciate if someone could tell me how to associate an UDO to a choose from list.
I have looked over the SDK example, but this is for standar SAP objects and I need to associate the choose from list to a customer object.
Best regardsThe choose from list (CFL) can be triggered from your edittext - there is some sample code in the DI API help file that shows this. Have a look for 'Adding a choose from list object' in the help file. Remember that where they set ObjectType="2", you should use the name of your UDO.
As can also be seen in the help file, CFL objects allow you to add conditions to determine what rows are displayed. In the example it shows selecting only where CardType = 'C'. The columns displayed can be tailored by the user at runtime, where they can select from any columns that are on your main UDO table.
There are a few limitations. At present CFL's do not allow you to directly specify a SQL query. Only data from the single table related to the 'ObjectType' is displayed. If you want a more complex query that displays data from multiple tables when you press tab, a formatted search may be more powerful. If you search the forums you should find one of my previous posts (probably about a year ago) where I showed how to link a formatted search to the tab keypress and have it behave in a very similar manner to a CFL.
John. -
Choose from List-CFL button is not visible
Hi Experts,
I am using SAP B1 8.8 PL 05 in ramp up. I have observed that in some of the clients PCs in Sales Order window I am not able to see the Choose from list button / CFL button for selecting Customer Or say Item.
This happens only in some Client PCs, where as in other clients PCs it works fine.
BR
Samir GandhiHi Rashid,
I did that. Now the indicator is displayed, but still I am not able to see the customer / item list.
BR
Samir Gandhi -
Removing Duplicates from a choose from list
Hi All,
I have a choose from list of obj 73 )Catalog Numbers (Table OSCN)
I also added conditions in the CFL that it only shows the Substitute for the CardType = 'S' (Supllier) Business Partners.
But I want to remove all the duplicate Substitutes from the CFL so that only distinct Catalog Numbers shows in the CFL.
// Adding 2 CFL, one for the button and one for the edit text.
oCFLCreationParams.MultiSelection = false;
oCFLCreationParams.ObjectType = "73";
oCFLCreationParams.UniqueID = "CFL1";
oCFL = oCFLs.Add(oCFLCreationParams);
//Adding Conditions to CFL1
oCons = oCFL.GetConditions();
oCon = oCons.Add();
oCon.Alias = "Substitute";
SAPbobsCOM.Recordset oSuppliers = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
oSuppliers.DoQuery("Select Distinct t1.Substitute From OSCN t1 Join OCRD t2 on t1.CardCode = t2.CardCode Where t2.CardType = 'S' Group By t1.Substitute");
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
while (!oSuppliers.EoF)
oCon.CondVal = oSuppliers.Fields.Item(0).Value.ToString();
oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
oCon = oCons.Add();
oCon.Alias = "Substitute";
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
oSuppliers.MoveNext();
oCFL.SetConditions(oCons);
Please advise....
Kind Regards,
Brenden DraperHi Brenden,
what you are trying to archieve won't work. Simply because CFL is getting all row data from OSCN and ItemCode or CardCode can differ for a specific substitute.
For example.
ItemCode,CardCode,Substitute
ItemA,BP1,sub1
ItemA,BP2,sub1
Would be 2 resultlines both with sub1 as substitute.
SQL equivalent :
Select Distinct t0.* from oscn t0 inner join OCRD t1 on t0.CardCode = t1.CardCode where t1.CardType = 'S'
My advise would be to open a simple form with a grid and datatable bound.
Some lines of coding and you get all you need.
regards,
Maik
Maybe you are looking for
-
How can I set up NTP in an Access Point Cisco 1100?
-
I'm using the spry dataset feature with an XML file. The XML is set up like so... <item> <image>(path to image)</image> <title>(short title)</title> <desc>(short description of image)</desc> <cat>(one of three categories: cars, sh
-
Actionscript execution order with attachMovie statements
Hi I wonder if anyone's got any decent solutions to this... Basically whenever I have a script generating an interface by dynamically placing movie clips (using the attachMovie method), I often need the actionscript of the attached movie clip to exec
-
Which security aspects can be covered with using GG?
Hi, Please explain what are the security aspects which are addressed by GG while doing real-time replication? Thanks & Regards, Noman.
-
Saludos Tenia la siguiente consulta. En la imagen que muestro es un reporte del query manager. Como puedo hacer para que donde esta los circulos rojos aparezcan los totales. Tengo entendido que es algo como SHIFT + CLICK o algo parecido Esta es el li