Can't use 2 operations on the same PPTX slide

Hello,

I'm trying to fill individual rows in a table using the "at" operation since the formatting for some of the rows is different than others. I've tried using:

{{row1 = array|at(0)}}
{{row2 = array|at(1)}}

but only the first function works, the 2nd stays blank. Is there a way to get both of these statements working in 1 slide?

Thanks,

Drew

Hi @Andrew_Perkins,

I reproduced the issue with my pptx sample and reported to the developers. It may be also helpful if you share your pptx template and the JSON sample.

Best regards,
Petr
Plumsail team

Hi @Andrew_Perkins,

We released a fix for this issue. Please give it a try and let us know if you have any further questions.

Best regards,
Petr
Plumsail team

Hey Petr, thanks. Aliases however have stopped working for me with filters. For example, I have a page with:

{{aboveAttainment = eastRegionPerformanceSummary|filter(value.Attainment >= 1)}}
{{belowAttainment = eastRegionPerformanceSummary|filter(value.Attainment < 1)}}

And the table populates with zero rows when trying to use these aliases.

Thanks,

Andrew

Hello @Andrew_Perkins,

Probably you have string values in the JSON?

I checked a simple example with numbers and it worked.

Please make sure that there is a number in the JSON, not string:

This is a number value

{
"number-value":1
}

This is a string value:

{
"string-value":"1"
}

Best regards,
Petr
Plumsail team

Petr, that's exactly what was happening, thank you!

1 Like

I've got one last question. Is it possible to filter an array with a variable number of objects X to X-1, for example:

{{len = eastRegionPerformance.Length - 1}}
{{filteredArray = eastRegionPerformanceAbove|top(len)}}

Thanks,

Andrew

Hi @Andrew_Perkins,

Unfortunately, this is not possible at the moment. The "top" operation supports only static values.

Best regards,
Petr
Plumsail team