Showing results for 
Search instead for 
Did you mean: 

How do I add combobox to system form matrix and load data into it.

Former Member
0 Kudos

I would like to add combobox as new field in all the marketing documents and load values into it.

We are working for button manufacturer.

Each button will have type,color, size, thickness.

There are about 100 types, 40 colors, 30 sizes, 10 thickness.

Above 10000 item codes will appear.

Selecting each item is very difficult through default options.

So, client wants to choose type, color,size, thickness so that item code should appear automatically.

Next row, all the type, color,size should repeat itself. If thickness is choosen item code should appear automatically.

Or if any change in one of these, change it so that item code should be formed automatically.

Working out formatted search looks to be very difficult for the client.

Using UDF with list values doesnot load data from database.

So, this thing should be possible through SDK.

I was trying to add combox to System form matrix. But, it is not happening.

I am not able to proceed.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


I think I'm trying to do the same thing as you are and I've got part of the problem solved, I think, but there is another part (that for me) might be impossible.

I have a UD field on the marketing rows, so it appears on each line in the matrix for orders, dns, etc. I manually went in to the client and set one valid value and description for the field on the define user fields option - something like '0', 'No value'. This caused B1 to put the field in the matrix as a combo box.

Next I load my values (with code, at run time), this way:

            Dim brwsr As Recordset = B1Comp.GetBusinessObject(BoObjectTypes.BoRecordset)
            brwsr.DoQuery("select cntctcode, coalesce(position, '') + ' '  + name fullname from ocpr where cardcode = '" & cardcode & "'")
            Do While Not brwsr.EoF
                matrix.Columns.Item("U_XXDENDUS").ValidValues.Add(brwsr.Fields.Item("cntctcode").Value, brwsr.Fields.Item("fullname").Value)

            matrix.Columns.Item("U_XXDENDUS").DisplayDesc = True

This does display my values, and oddly, the initial one ("No Value") seems to automatically be removed. The problem I have is that I'm basing the values in the combo box on information specific to the customer, so I have to clear and reload the CB for each document. But the system won't let me remove the old values and I don't think there's anyway around that.

But if you need to only load them once and they are the same all the time, you might be able to get away with this.

BTW - the displaydesc flag tells b1 to display on the screen the description portion of the validvalue combination, but it still stores the value portion in the table).

Good Luck!

Answers (0)