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 Gandhi
Hi Rashid,
I did that. Now the indicator is displayed, but still I am not able to see the customer / item list.
BR
Samir Gandhi
Similar Messages
-
Choose From List Cancel Button Throws Exception
Hi all,
When I click the "Cancel" Button on my CFL, I get an error....
EXCEPTION: Matrix__EBS_FRM_CRDCLM__64.OnAfterChooseFromList raised
No matching records found (ODBC -2028)
Any ideas???Hi
in your choose from list event add this condition
If Not pval.SelectedObjects Is Nothing Then
'write your code in this if condition
end if
hope it will help u.
Regards,
Mithun. -
Class inhertis from JButton, but button is not visible
Hi!
I'm having a class that inherits JButton. The idea was to give the button additional parameters, so it inherits from JButton to have all the attributes from JButton... But the problem is, that the Buttons are only visible when I touch them with the mouse. When I move the window they are invisible again...
Does anybody know why? Thanks for your help!
P.S Sorry for my bad english....Okay, thanks for that hint!
Here is the class for the gui:
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
public class Temp extends JFrame{
private static final long serialVersionUID = 5945597724189252185L;
private JMenuItem closeItem = null;
private JMenuItem newItem = null;
private JPanel mainPanel = null;
private JLabel startImage = null;
private MineFieldButton[][] mines = null;
public Temp(){
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
addMenu();
this.add(getMainPanel());
this.pack();
private JPanel getMainPanel(){
if (mainPanel == null){
mainPanel = new JPanel();
if (mines == null)
mainPanel.add(getStartImage());
else{
mainPanel.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.HORIZONTAL;
c.ipady = 20;
c.ipadx = 20;
for (int x=0;x<mines.length;x++){
for (int y=0;y<mines[x].length;y++){
c.gridx = x;
c.gridy = y;
mainPanel.add(mines[x][y],c);
return mainPanel;
private JLabel getStartImage(){
if(startImage == null){
startImage = new JLabel();
return startImage;
private void addMenu(){
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("File");
menu.add(getNewItem());
menu.add(getCloseItem());
menuBar.add(menu);
this.setJMenuBar(menuBar);
private JMenuItem getNewItem(){
if (newItem == null){
newItem = new JMenuItem("New");
newItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
createMines();
return newItem;
private JMenuItem getCloseItem(){
if (closeItem == null){
closeItem = new JMenuItem("Close");
closeItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
System.exit(0);
return closeItem;
public void showGUI(){
this.setVisible(true);
private void createMines(){
initMinesGUI();
this.remove(getMainPanel());
mainPanel = null;
this.add(getMainPanel());
this.pack();
private void initMinesGUI(){
mines = new MineFieldButton[10][10];
for (int x=0;x<mines.length;x++){
for (int y=0;y<mines[x].length;y++){
mines[x][y] = new MineFieldButton();
mines[x][y].setBorder(BorderFactory.createRaisedBevelBorder());
mines[x][y].setX(x);
mines[x][y].setY(y);
mines[x][y].setNumber(x*y);
}And here for the class that inherits JButton "MineFieldButton":
import javax.swing.JButton;
public class MineFieldButton extends JButton{
private static final long serialVersionUID = -1020769129018597011L;
private int number = 0;
private int x;
private int y;
public int getNumber() {
return number;
public void setNumber(int number) {
this.number = number;
public int getX() {
return x;
public void setX(int x) {
this.x = x;
public int getY() {
return y;
public void setY(int y) {
this.y = y;
}I hope that you can find my error.... And that this is a SSCCE :-)
Thanks! -
I have made a UDT
and I want to create a choose From List of that table
I know how to create choose frm list for system tables
like making Business partner choose from list
but I'm not able to make choose frm list for UDT
please someone answer my questionHI Riya,
You can link a CFL to a User Defined Object but not a plain User Defined Table. A full list of options can be found in the UI help under BoLinkedObject Enumeration.
Thanks,
Lisa
SAP Business One Forums -
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. -
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 -
Get cardname along with cardcode usuing Choose From List Button
Hi,
I am using Choose From List button in my form. If I click the button then I can see the matrix containing business partners list and if I choose any business partner from that list then I can see the business partners id or cardcode from ocrd table in the corresponding textbox.
But I want the business partner's name or cardname also should come simultaneously in the next textbox of my form. Can some one provide me any code help for this process.
Regards,
Sudeshna.Hi Sudesha,
You can get the CardName with the following code:
sCardCode = oDataTable.GetValue(0, 0)
sCardName = oDataTable.GetValue(1, 0)
Hope it helps,
Adele -
I have a form build in Screen painter and i have added a Choose from list to that form. I have asocieted the CFL with a EdiText. It work perfectly in add mode, but i cannot open the CFL when the form is in find mode.(I cannot even see the button to press for oppening the CFL). Can someone help me?
I am in the phase of binding the edittext, comoboxes and other controls on my form. I want to search by parameters. For instance i want to find all the entrys from a business partener.
I would like to know if I can choose from a list of business partener when i am in a find mode using CFL .
My problem it is not when i click find button but when i complete the fields, how can i select a business partener from a list? -
Problem in Choose from list.
Hi,
As I tried CFL for a user defined form, when I select an item from CFL and it is displaying in the relevant field. And when I save the data it is perfectly saving with the message of "Operation has been completed successfully". But the data is not saving in the field in which is the CFL is activating.
It would be appreciated, if any one can give the solution please.
The steps I' ve followed as,
1. In the screen painter I' ve added the choose from list thru' the collection folder.
2. Then the choose from list id is attached and give the allias in the item's specific property.
3. Then I' ve written code in the load form function as follows.
Oform.DataSources.UserDataSources.Add("EditDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
txtaccode.DataBind.SetBound(True, "", "EditDS")
4. In the item event
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
oCFLEvento = pVal
Dim sCFL_ID As String
sCFL_ID = oCFLEvento.ChooseFromListUID
Dim oForm As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item(FormUID)
Dim oCFL As SAPbouiCOM.ChooseFromList
oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
If oCFLEvento.BeforeAction = False Then
Dim oDataTable As SAPbouiCOM.DataTable
oDataTable = oCFLEvento.SelectedObjects
Dim val As String
Dim val1 As String
Dim val2 As String
Dim val3 As String
Try
Try
val = oDataTable.GetValue(0, 0)
val1 = oDataTable.GetValue(1, 0)
If (pVal.ItemUID = "txtaccode") Then
oForm.DataSources.UserDataSources.Item("EditDS").ValueEx = val
txtaccode.Value = val
oForm.DataSources.UserDataSources.Item("EditDS1").ValueEx = val1
End If
Catch ex As Exception
Exit Sub 'For Exception raised for Cancel Button
End Try
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
End If
End SubChecks if the property TableName in the field is pointed to the table to store de data.
Go to Example: How to binding CFL to a UDO in a customized System Form. and rate it
regards -
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 -
How to filter Choose from list object rows?
Hi everyone,
I'd like to show Choose from list window using SBO 2005 PL07, Actually I want to show the Active Account of G/L Account, I set the CFL object to one column as following:
oCFLCreationParams.ObjectType = SAPbouiCOM.BoLinkedObject.lf_GLAccounts
oCFLCreationParams.UniqueID = "CFL"
oCFL = oCFLs.Add(oCFLCreationParams)
Who knows how to set Choose From list object only show Active Account and do not show Title Account.
Thanks for your help!
KathyHi kathy
I have not tried it on the gl accounts. But basicaly you need to add conditions to filter it. The following is an example that you would of used for business partners but only customers.
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
oCFLCreationParams.ObjectType = "2"
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)
oCFLCreationParams.UniqueID = "CFL2"
oCFL = oCFLs.Add(oCFLCreationParams)
The above also compensates for the tab.
Hope it helps -
Is it possible to populate a Choose From List manually?
Hi
I've got a requirement in a SDK screen that needs to be written to have a Choose From List contained on a Matrix column that should allow the selection of Item Masters as well as the selection of specific data contained within a User Defined Table. Whenever using ChooseFromLists I've always only ever used them to link to a object such as Items, Sales Order etc. and not a combination, or even to a User Defined Table. Is this even possible.
If not I guess the only way around it would be to create a form mimicking the ChooseFromList which I could populate with what ever I like?
Thanks
SteveHi Steven,
Yes, Its possible which behaves as system CFL.
Design the form like cfl having grid, choose button, cancel button and edittext of find. When you tab on edittext on form open the CFL form and after load form fill the grid by Datatable using sql query. Write code for select grid line on click of grid. Write the code on choose button which retrive value from grid.
Thanks,
Mahesh -
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 -
Edit and text and choose from list
hello,
I am trying to create a form that resemle to the purchase order form.
In the purchase order form when we select the card code from the choose from list
the system fill all the fileds like the name docnum .. with relevant information.
i tried to do that by using the vent et_evaluate of the edit text bind with the Card code in my form.
The problem is that when i clik on the choose from list button the event is lanched and then the value of the card code is "" so i can't crate my queries to get the infomation like suplier name and ..
does any body have an answer?
This my code:
switch (pVal.ItemUID)
case "3":
_Form.Freeze(true);
try
string NumFournisseur =
((EditText) _Form.Items.Item("3").Specific).Value;
ArrayList DFournisseur =
new DB.PurchaseRequest(_SboCompany).
GetDetailsFournisseur(NumFournisseur);
EditText Textvar;
// remplir nom fournisseur et nom contact
Textvar = (EditText) _Form.Items.Item("2").Specific;
Textvar.String = DFournisseur[0].ToString();
Textvar = (EditText) _Form.Items.Item("4").Specific;
Textvar.String = DFournisseur[1].ToString();
// remplir les dates comptable , de livraiosn et du document
Textvar = (EditText) _Form.Items.Item("17").Specific;
Textvar.String = DateTime.Today.ToString();
Textvar = (EditText) _Form.Items.Item("19").Specific;
Textvar.String = DateTime.Today.ToString();
Textvar = (EditText) _Form.Items.Item("21").Specific;
Textvar.String = DateTime.Today.ToString();
// remplir devise partenaire et numéro document
((EditText) _Form.Items.Item("59").Specific).String =
new DB.PurchaseRequest(_SboCompany).GetCurrencyCode(
NumFournisseur);
_Form.Items.Item("59").Visible = true;
_Form.Items.Item("59").Enabled = false;
((ComboBox) _Form.Items.Item("10").Specific).Select(
"primary",
BoSearchKey.
psk_Index);
((EditText) _Form.Items.Item("11").Specific).String =
new DB.PurchaseRequest(_SboCompany).GetLastDocNum().
ToString();
((EditText) _Form.Items.Item("12").Specific).String = "0";
catch (Exception e)
Console.WriteLine(e.Message);
_Form.Freeze(false);
break;
break;
catch (Exception ex)
Console.Write(ex.Message);
break;Hey Achref,
You can use the event and code like this:
string vendCode = string.Empty;
SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent) pVal;
string sCFL_ID = oCFLEvento.ChooseFromListUID;
SAPbouiCOM.ChooseFromList oCFL = oVendorSourcingForm.ChooseFromLists.Item(sCFL_ID);
SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
if (oDataTable != null)
//get selected value from datatable
if (oDataTable.Rows.Count > 0)vendCode = oDataTable.GetValue(0, 0).ToString();
Also check out 17.ChooseFromList in the samples that you can download.
Hope that helps
Curtis -
Choose From List and Golden arrow link in System Matrix UDF column
I'm wondering if there is a way through the SDK to create a 'Choose From List' and Golden arrow linked button in a System Matrix UDF column?
For example the Item Code in a sales order matrix does both.Hi,
Try this code for adding CFL.
SAPbouiCOM.ChooseFromListCollection oCFLs = null;
SAPbouiCOM.Conditions oCons = null;
SAPbouiCOM.Condition oCon = null;
oCFLs = oForm.ChooseFromLists;
SAPbouiCOM.ChooseFromList oCFL = null;
SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
oCFLCreationParams = ( ( SAPbouiCOM.ChooseFromListCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams ) ) );
oCFLCreationParams.MultiSelection = false;
oCFLCreationParams.ObjectType = "object id ";
oCFLCreationParams.UniqueID = "CFL1";
oCFL = oCFLs.Add( oCFLCreationParams );
oColumn.ChooseFromListUID = "CFL1";
//where oColumn is the instance of that column.
Hope u will get help....
Thanks and Regards,
Lalit
Maybe you are looking for
-
Restriction for items from Purchase Order based on Sale Order
Hi ! We create PO directly from Sale Order ( by ticking Option under Logistic tab, 'Purchase Order') for customer C01 (for eg). From the PO created, we post GRPO. Now our need is, Assume if 10 Qty is been ordered in such a way and been receive
-
How to switch from a program to another one
Hi all, I would like to run a robotic system in autonomous mode. To achieve this, i have two programs. The firts one is to drive the robot autonomously. The second one is to do another function, which doesn't have nothing to do with the first one. My
-
Updating Planning Groups in line items
Dear SAPers We have updated the Vendor Master Data with revised planning groups. Can you please tell me how the documents already posted can be updated with the new planning group. For example in FBL1N and FNL5N the new planning groups are visable fo
-
Mass renaming...using command line
hi I can rename a folder containing files with filenames without space to another name by using this command: i=1;for f in `ls`;do mv -v $f $i\large.png; echo $((i=i+1));done but the thing is that if ther is a space in the name of a file then it beak
-
Hello All.. I have a requiremnt to conmtrol the RUN ID which generartes in Pre -DME.I would like to edit the system generated run ID as per the country specific.For example usually sytem generated the ID as 112230P.But i want ti edit the the first tw