Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8419

et_Choose_From_List not triggering

$
0
0

Hi All,

 

I've got a bit of a problem getting the info from a choose from list into an edit text.  The following code should work fine.

 

            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)

                MessageBox.Show("This event triggered")

                If oCFLEvento.BeforeAction = False Then

                    Dim oDataTable As SAPbouiCOM.DataTable

                    oDataTable = oCFLEvento.SelectedObjects

                    Dim val As String

                    Try

                        val = oDataTable.GetValue(0, 0)

                    Catch ex As Exception

                        MessageBox.Show(ex.Message)

                    End Try

                    If (pVal.ItemUID = "txt_code") Or (pVal.ItemUID = "Button") Then

                        oForm.DataSources.UserDataSources.Item("EditDS").ValueEx = val

                    End If

                    MessageBox.Show(val)

                End If

 

 

I actually added in a few superfluous message boxes just to try and locate where my problem was coming from.  Lo and Behold, I eventually find out that et_Choose_From_List is never being picked up by the event handlers.  Pval never returns that event(I actually coded a message box to show my every event passed through to my sub).  Tried adding an event filter for it, that didn't work.  Any suggestions?


Viewing all articles
Browse latest Browse all 8419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>