cancel
Showing results for 
Search instead for 
Did you mean: 

Matrix: hidden fields & writing

Former Member
0 Kudos
182

Hello all!

Finally I managed to write into a matrix using something like this:

MyForm = application.forms.item(<myform149>)

MyMatrix=myform.items.item("38").specific

MyColumn=MyMatrix.Columns.item("U_MyCol")

FirstCell=MyColumn.Cells.item(1)

MyCell.specific.String="TestValue"

This raised another question concerning the matrix object.

I noticed that it is only possible to write into the cell of a matrix if it is both visible and active.

However, this means that the user can access the field as well.

Is there a known way of setting the corresponding dbdatasource field directly?

Thanks Lutz Morrien

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I have the same problem and no solution too.

Former Member
0 Kudos

Hi,

We added new method in version 6.5 to the matrix object SetLineData() and GetLineData()

those 2 methods are  working in the DataSource level and not in the item level.

One of the samples in version 6.5 demostrate how to do it.

the sample name is Matrix and cell, please look and see it can help you.

In version 6.5 it will work only for UserDataSource in the 6.5 it will work also for the DBDataSource.

Working this way will also improve the performance.

Gali

Former Member
0 Kudos

Hi,

to whom it may interest...

we eventually came up with a solution that does work allright.

If you want to use the matrix fields for read and not allow the user to change the content or see them, just change the width of the column to 1 or 0 after the FORM_LOAD event.

As in:

   'get matrix on quotation form

   uimtxQuotation = uifrmQuotation.Items.Item("38").Specific

    'resize cells on startup

    uimtxQuotation.Columns.Item("U_PLineNum").Width = 1

That is a practicable workaround, I think. (If size is set to 1 users can still open the columns, although it is a bit tricky).

HTH Lutz Morrien

Former Member
0 Kudos

Hi,

I can't find a sample for the SetLineData() and GetLineData() methods!!

I want to write some data to hidden user-defined fields in SBO form.

thx,

Ingo

Former Member
0 Kudos

Gali,

our customers have just installed version 6.2.

I have asked whether an update is an option, but for now it is not.

Is there a known workaround for the issue?

TIA Lutz