cancel
Showing results for 
Search instead for 
Did you mean: 

Adding columns in system form

Former Member
0 Kudos

Hi SBO developers!...

I want to add columns in "document numbering" form in its load event. Someone could sugest me how to do that? I try to make it but the error is "Matrix - Line Exists" after to execute the sentence "colum.add(id,16)"in my code.

Thanks a lot.

It's very importan to me.

VDM

Accepted Solutions (0)

Answers (1)

Answers (1)

rasmuswulff_jensen
Active Contributor
0 Kudos

As far as I know you cant make an extra row on the fly if lines exist in a matrix.

I have not tried this but try adding a userfield to the NNM1 table. This way the new column should be there always and you should be able to show and hide it... In theory...

Former Member
0 Kudos

> As far as I know you cant make an extra row on the

> fly if lines exist in a matrix.

The SBO UI-help says the same.

> I have not tried this but try adding a userfield to

> the XYZ table. This way the new column should be

> there always and you should be able to show and hide

> it...

I can confirm that, that's exatly what i'm doing. For a simple field, you get a column with an EditTexts.

If you specify valid values, you get a column with ComboBoxes.

Show / Hide works just like showing/hiding other matrix fields. If you want to it programmatically, you may want to have a closer look at table CPRF. I didn't figure out how to do it using the SDK.

If anyone is interested I could post following functions:

SetInvisible(fieldName As String, formType As String, itemId As String)

SetVisible(fieldName As String, formType As String, itemId As String)

Florian

rasmuswulff_jensen
Active Contributor
0 Kudos

Can't you just use a UI Column's property "visible" or if that not work set its "width" to 0 when hiding?

matrix.Colums.Item("ColUID").Visible = false

Former Member
0 Kudos

I did not try that... Is it permanently hidden then? Or would I have to do it on every FORM_LOAD?

I don't want to hide a UI-column, I would like to configure where a User Definde Field should be displayed... This is what I'm doing at the moment by changing CPRF only once, at addon installation time... you also can specify there on which position the column should appear...

In the SBO GUI you can do the same thing by opening the Form "Form Settings" (Formtype=998, one of the icons in the Toolbar)

rasmuswulff_jensen
Active Contributor
0 Kudos

I was thinking at FORM_LOAD every time, but this really depends on the need for the addon... I', generally very carefully with making changes with the sql, but I know its sometime the only possible action