on 10-22-2008 5:45 PM
Hello experts. I have an UDO created in xml that has an item that is the combo, which would have to show me a description that this in a table according to the code of another table. If the UDO I do it for fault it me relates it well, but when I raise the xml it me does not relate it and shows me only the code. Thank you.
<item AffectsFormMode="1" uid="13" type="113"...
<AutoManagedAttribute />
<specific>
<databind alias="U_TGV_FIIBB_CODE" databound="1" table="@TGV_TIIBB_CODES_BP" />
</specific>
</item>
<item AffectsFormMode="1" uid="14" type="8"...
<specific caption="Codigo de IIBB" />
</item>
Dim oFrm As SAPbouiCOM.Form
Dim oRS As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Dim intRecCount As Integer
oFrm = SBO_Application.Forms.GetForm("BPAR21", 1)
If oFrm.Items.Count > 0 Then
Dim oCombo As SAPbouiCOM.ComboBox
oCombo = oFrm.Items.Item("13").Specific
If oCombo.ValidValues.Count = 0 Then
oRS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
oRS.DoQuery("SELECT Code as Code, Name as Name FROM [@TGV_TIIBB_CODES] ORDER BY Name")
intRecCount = oRS.RecordCount
If intRecCount > 0 Then
Dim sCode As String = ""
Dim sName As String = ""
oRS.MoveFirst()
While Not oRS.EoF
If Not oRS.Fields.Item(0).Value Is Nothing Then
sCode = oRS.Fields.Item(0).Value
If Not oRS.Fields.Item(1).Value Is Nothing Then
sName = oRS.Fields.Item(1).Value
Else
sName = "Not defined "
End If
oCombo.ValidValues.Add(sCode, sName)
End If
oRS.MoveNext()
End While
End If
Edited by: Andres Blanco on Oct 22, 2008 6:52 PM
Hi,
i hope i understood your problem...
if you want to see the description in the combobox when you select a value use:
oFrm.Items.Item("13").DisplayDesc = true
lg David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.