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.
Madhavi

Hi,
Use following query...
Select CardCode,CardName,cardType  from OCRD Where CardType='S'
CardType : S for Vendor,C for Customer,L for LEAD
Regards
Sanjay

Similar Messages

  • Choose From List Condition

    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
    Mathi

    The 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.

  • 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

  • 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

  • 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
    Steve

    Hi 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

  • 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

  • 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

  • Choose From list in Matrix UDF

    i create a UDF in Sales Order Row, I want to assign choose From list in the Matrix for the UDF once user click on tab button.
    How can i assign the Choose from list for the UDF column?

    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

  • Add Choose From List to a Matrix

    Hi,
    Need help on how to add a choose from list to a matrix column?
    Thanks!

    Hi,
    Step1 :First step is to create the CFL as below
    Private Sub AddChooseFromListToWorkOrder()
            'Choose From List Collection object to store the collection
            Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
            'Conditions object to set the conditons
            Dim oCons As SAPbouiCOM.Conditions
            'Condition object to set the conditons
            Dim oCon As SAPbouiCOM.Condition
            'Getting the Form Choose From Lists
            oCFLs = oForm.ChooseFromLists
            'Choose From List object to store the ChooseFromList
            Dim oCFL As SAPbouiCOM.ChooseFromList
            'ChooseFromListCreationParams to create the parameters for the CFL
            Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
            oCFLCreationParams = oSBOApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
            oCFLCreationParams.MultiSelection = False
            oCFLCreationParams.ObjectType = "4"
            oCFLCreationParams.UniqueID = "UDCFL1"
            oCFL = oCFLs.Add(oCFLCreationParams)
            ' Adding Conditions to CFL
            oCons = oCFL.GetConditions()
            oCon = oCons.Add()
            oCon.Alias = "U_HasPSC"
            oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
            oCon.CondVal = "Y"
            oCFL.SetConditions(oCons)
        End Sub
    Step2: Then add this cfl in form load
    AddChooseFromListToWorkOrder()
    oMatrix = oForm.Items.Item("matItems").Specific
    oColumns = oMatrix.Columns
    oColumn = oColumns.Item("colItem")
    oColumn.ChooseFromListUID = "UDCFL1"
    oColumn.ChooseFromListAlias = "ItemCode"
    Step 3: catch the CFL Event in Item events of the form
    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                            oForm = oSBOApplication.Forms.Item("IS_WKORDER")
                            Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
                            oCFLEvento = pVal
                            Dim sCFL_ID As String
                            sCFL_ID = oCFLEvento.ChooseFromListUID
                            Dim oCFL As SAPbouiCOM.ChooseFromList
                            oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
                            If oCFLEvento.BeforeAction = False Then
                                Dim oDataTable As SAPbouiCOM.DataTable = oCFLEvento.SelectedObjects
                                'oForm.DataSources.DBDataSources.Add("@IS_WKO_ROWS")
                                Try
                                    If pVal.ItemUID = "matItems" And pVal.ColUID = "colItem" And oCFL.UniqueID = "UDCFL1" Then
                                        oMatrix = oForm.Items.Item("matItems").Specific
                                        oEdit = oMatrix.Columns.Item(2).Cells.Item(pVal.Row).Specific
                                        oEdit.Value = oDataTable.GetValue(1, 0).ToString()
                                        oEdit = oMatrix.Columns.Item(4).Cells.Item(pVal.Row).Specific
                                        oEdit.Value = strUOM
                                        oEdit = oMatrix.Columns.Item(5).Cells.Item(pVal.Row).Specific
                                        oEdit.Value = strPSCode
                                        oEdit = oMatrix.Columns.Item(1).Cells.Item(pVal.Row).Specific
                                        oEdit.Value = oDataTable.GetValue(0, 0).ToString()
                                    End If
                                Catch ex As Exception
                                End Try
                            End If
                        End If
    Hope This helps
    Regards,
    Noor
    Edited by: noor_023 on Mar 31, 2010 10:55 AM

  • 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 in Matrix

    Hey All,
    Has anyone been able to get the choose from list in a matrix text field working in SBO 2005 patch level 6? We have tried the tech demo and it works for new rows but not for existing rows. Also we have written our own code to set the matrix text box on the choose from list event and we get a general failure exception even though the value still gets set properly.
    If anyone has this working please post so we can all know how to do this properly.

    Hi there,
    This "Choose from list" thing is new for me, there's a Choose from List example in the new techDemo but i don't understand the code.. too complicated for me.. Is there any simple code/sample for this?
    Well i manage to trigger the choose from list .. but don't know how to put the selected value to the cell..
    Bruce..

  • Choose from List in A matrix for choosing two or more rows at same time

    Hi Friends,
    Actually I m using choose from list to select Items in a row, i can select Two or more rows from the List but while clicking choose it is taking only one value.
    The no of rows are not activated tat i m choosing from list.
    Thanks in advance
    Vivek

    Hi.
    Here is a [link|https://forums.sdn.sap.com/click.jspa?searchID=12829558&messageID=5584893] where are you can find on of my example on CFL on matrix column.
    I think, you need to made some changes in code from these lines...
        Dim oDataTable As SAPbouiCOM.DataTable
        oDataTable = oCFLEvento.SelectedObjects
        for ...
        end for
    Reply if this guideline was usefull for you.
    Bye

  • Change data in existing "Choose from list" matrix

    Hi,
      in UI GUI->order form . When add a new order, hit "TAB" to select BP from existing list. I want to use my own sql to populate the BP list (currently the GUI defaults to return all customers).
    Is there a way? I mean if I just want to change data in the matrix and let B1 continue to make the "Choose from list" form (form "10001") with my own new customer list.  Set BubbleEvent = true will just re-read all cards after I query my result.
      any help is appriciated!

    Hello,
    I came across the same issue with the Items Choose from List on the Sales Order screen. It is possible to load your own Choose from List form and populate the matrix using recordset objects and userdatasources. The same logic could be applied to the BP Choose from List form. The following code displays the user form and matrix items - separate code is needed to handle the selection process on this form. There maybe a faster way of acheiving this using UDTs etc but it seems to work ok.
    'When user presses Tab key in Item No. column.
    If pVal.EventType = et_KEY_DOWN Then
    If pVal.ItemUID = "38" And pVal.ColUID = "1" And _
    pVal.Before_Action = True And pVal.CharPressed = vbKeyTab Then
    'Load new Choose from List form.
    'This is actually an exported and edited version of the SBO form.
    LoadFromXML sIIS_ITEMLIST_XML
    'Populate matrix with items returned from SQL query.
    'Use recordset, arrays, userdatasources.
    Set oRecordSet = oCmp.GetBusinessObject(BoRecordset)
    sSql = "Select OITM.ItemCode, OITM.ItemName, OITM.OnHand FROM OITM " & _
        "Where Upper(Left(OITM.ItemCode,2)) = 'B1'"
    oRecordSet.DoQuery sSql
    nRows = oRecordSet.RecordCount
    If nRows <> 0 Then
    'Array declarations.
    Dim ItemCode(), ItemName(), OnHand()
    ReDim ItemCode(nRows - 1)
    ReDim ItemName(nRows - 1)
    ReDim OnHand(nRows - 1)
    'Add userdatasources to form.
    oForm.DataSources.UserDataSources.Add "ItemCode", dt_LONG_TEXT, 20
    oForm.DataSources.UserDataSources.Add "ItemName", dt_LONG_TEXT, 100
    oForm.DataSources.UserDataSources.Add "OnHand", dt_LONG_NUMBER
    i = 0
    'Populate arrays from recordset.
    Do While oRecordSet.EOF <> True
        ItemCode(i) = oRecordSet.Fields.Item(0).Value
        ItemName(i) = oRecordSet.Fields.Item(1).Value
        OnHand(i) = oRecordSet.Fields.Item(2).Value
        oRecordSet.MoveNext
        i = i + 1
    Loop
    'Bind data fields to form items.
    Set oMatrix = oForm.Items.Item("7").Specific
    Set oColumn = oMatrix.Columns.Item("ItemCode")
    oColumn.DataBind.SetBound True, "", "ItemCode"
    Set oMatrix = oForm.Items.Item("7").Specific
    Set oColumn = oMatrix.Columns.Item("ItemName")
    oColumn.DataBind.SetBound True, "", "ItemName"
    Set oMatrix = oForm.Items.Item("7").Specific
    Set oColumn = oMatrix.Columns.Item("OnHand")
    oColumn.DataBind.SetBound True, "", "OnHand"
    'Get data from datasources.
    Dim oUItemCode As SAPbouiCOM.UserDataSource
    Dim oUItemName As SAPbouiCOM.UserDataSource
    Dim oUOnHand As SAPbouiCOM.UserDataSource
    Set oUItemCode = oForm.DataSources.UserDataSources.Item("ItemCode")
    Set oUItemName = oForm.DataSources.UserDataSources.Item("ItemName")
    Set oUOnHand = oForm.DataSources.UserDataSources.Item("OnHand")
    oMatrix.Clear
    'For each returned record in recordset then
    'add row to matrix and populate it from
    'userdatasource.
    For i = 1 To nRows
        oMatrix.AddRow
        oUItemCode.Value = ItemCode(i - 1)
        oUItemName.Value = ItemName(i - 1)
        oUOnHand.Value = OnHand(i - 1)
        oMatrix.SetLineData
    Next i
    End If
    'Show form. This also sets focus to edittext field.
    oForm.Visible = True
    'Don't display standard SBO item list form.
    BubbleEvent = False
    End If
    End If
    Regards,
    Andrew.

  • 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.....
    Thanks

    Hi 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

  • 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 Sub

    Checks 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

Maybe you are looking for