cancel
Showing results for 
Search instead for 
Did you mean: 

Matrix - Total of column amount

Former Member
0 Kudos

Hi friends!

In some forms we can find a matrix where a total sum of the amounts of a column is displayed below the matrix under this column.

As an example we can see this in form Production/Bill of Materials where the sum of all amounts in column 'Total' is displayed below the matrix.

In this example each cell of column has the system information form=672, item=3, column=5, row=xx, where form=672 is the Bill of Materials-form and item=3 is the matrix of this form.

The sum of column 'Total' displayed below the matrix also has the system information form=672, item=3. Does this mean that thi sum is part of the matrix-object? In the UI object reference I couldn't find any property or method to access such a total-value.

And how can I read/write this value?

Many thanks in advance for helpful hints to this question!

Frank Romeni

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Frank Romeni,

I don't think we have an object for "Total" in the UI API.

I also came across the same problem, which I solved as following:

1) Create a Text box, and make it disabled.

2) Whenever matrix is resized:

(Catch the form resize event)

Calculate the position of your column. I guess there is no straightforward property and you need to calculate it by adding the width of all the previous columns.

For e.g, if you want to display the total of Column n:

Text1.Left = (matrix.left + column1.width + column2.width +...column(n-1).width)

3) Load the value of Total text box by sum of all the values in that column (Dont add values in the UI, try to use SQL => Select sum(columnN) from Tbl1,..)

Hope it helps.

Post in case you got any straightforward solution:)

Regards,

-Geetha

Former Member
0 Kudos

Hi Geetha,

thank you for your answer but I guess you didn't get my main question. The question is not how to calculate the sum of the matrix column and how to display it somewhere in the form.

When you open e.g. the form 'Bill of Materials' this sum is already display below the matrix. Suppose I want to make this invisible. Then I have to access the corresponding item in the form and write xxx.Visible = false;

But neither is there such an item in the form (at least I can't find it) nor is it part of the matrix.

This is my problem. There is something written into the form but no corresponding component ...

Frank Romeni

Former Member
0 Kudos

Hi Frank,

Try using Event logger and clicking on that particular 'Total' item. And, find out on which item that event happened.

-Geetha

Answers (0)