Afternoon all, I have an odd issue with a dynamic gridLayout. Th

Afternoon all,

I have an odd issue with a dynamic gridLayout.
The grid has a dynamic number of both rows and columns, with total and subtotal rows and most of the time this is working - however..........

when there is only 1 row of data I am getting an error of:
"Rule '?' has 1 parameters, but instead passed 3 parameters."

I understand the error, but not how to solve it......

For 1 data row the a!applyComponents is returning:
{Total row
SubTotal row
data row}

and this leads to the error - with the 3 rows being the 3 parameters in the error above.

HOWEVER

If there are 2 datasets:
{
{Total row,
SubTotal row,
data row},
{data2 row}
}
is being correctly rendered with 4 rows in the grid.

Does anyone have any ideas why this is happen... and more importantly how to solve it!

Thanks in advance

Gareth

OriginalPostID-158868

OriginalPostID-158868

  Discussion posts and replies are publicly visible

Parents
  • Hiya Tim,

    If count(dataset) = 1 I am calling the rule without the applycomponents and that was taking care of the problem, however, in my real world, the dataset is split into sections defined by a non-displayed field, with the sections separated by a subtotal row.

    As long as at least 1 of these sections contains 2 or more rows the grid renders.

    When there is only 1 data row in each of the sections, the issue is occurring.

    A little digging later and (using the example attached above)
    the dataType returned from rule!exampleGridRows is:

    Dataset1 = Type 1233 (RowLayout?list) and count() = 4
    Dataset2 = Type 197 (List of Variant) and count() = 1

    Something seems wrong here in the way a!applyComponents is being applied.

Reply
  • Hiya Tim,

    If count(dataset) = 1 I am calling the rule without the applycomponents and that was taking care of the problem, however, in my real world, the dataset is split into sections defined by a non-displayed field, with the sections separated by a subtotal row.

    As long as at least 1 of these sections contains 2 or more rows the grid renders.

    When there is only 1 data row in each of the sections, the issue is occurring.

    A little digging later and (using the example attached above)
    the dataType returned from rule!exampleGridRows is:

    Dataset1 = Type 1233 (RowLayout?list) and count() = 4
    Dataset2 = Type 197 (List of Variant) and count() = 1

    Something seems wrong here in the way a!applyComponents is being applied.

Children
No Data