cancel
Showing results for 
Search instead for 
Did you mean: 

UI+DI: Updating hidden User defined fields in Matrix

Former Member
0 Kudos

I put some user defined fields to the matrix in the Quotation form (uid 139).

To fill the user defined fields (cell-level) with data they have to be activated. Everything works fine.

Now I want to hide the fields an fill them with data.

I tried these lines of code:

oSBOMatrix = oForm.Items.Item(.....).Specific

l_uds = oForm.DataSources.UserDataSources.Add("U_ek_1_fw", BoDataType.dt_PRICE)

l_oColumns = oSBOMatrix.Columns

l_oColumn = l_oColumns.Item("U_ek_1_fw")

l_oColumn.DataBind.SetBound(True, "", "U_ek_1_fw")

l_uds.Value = 100

oSBOMatrix.SetLineData(1)

With the DataBind statement I get this error:

The item is not a user defined item and cannot be manipulated in such manner

Can I use UserDataSources with existing forms?

How can I fill hidden fields within a matrix in an existing form?

thx,

Ingo

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ingo

If you have added your UDFs by means of SBO - System Menu - Tools - Manage User Fields - Marketing Documents - Rows, you MUSTN'T bind these UDFs to UserDataSoruces again; they are already bound to columns like 'U_xyz'... in the tables QUT1 (quotation), RDR1 (order)...

To handle data in marketing document matrix, look what e.g. Lutz Morrien wrote about this topic. He gave some clever hints in this forum.

Former Member
0 Kudos

I added the fields the way you described.

I can't find the hints! I have only read about the column

width=1 hint. What I want is completly hide the UDF and

fill them with data.

How can I use already bounded datasources?

Is it something like this:

l_uds = form.datasources.userdatasources.item("U_xxxxx")

l_uds.value = "....."

Matrix.setlinedata(..)

TIA,

Ingo

Former Member
0 Kudos

Hi Ingo

To your first question:

I fear Lutz' hint wants to tell us: You can't do what you want to! You can't write data into a hidden matrix column... at least, until now nobody told me way how to do it.

To your second question:

The matrix cells ARE bound to UDFs in business document tables. So, if you want to write data into your UDFs, you just have to write that data into the corresponding matrix column - and that's it. SBO writes back your matrix cells data into your databas when you close the form. And it does it for common fields AND UDFs as well. That's fine, isn't it?

Former Member
0 Kudos

OK, thank you.