How can I access tables with different names but the same data

  • 1
  • Question
  • Updated 2 years ago
Hello community!

I'm trying to build a report on a few fields of a scaffolding table data block from many pages. The problem is that the name of the table was changed (but the fields named the same), so there are some pages with the old ("Detailsorder") and some with the new table name ("SW_Updates"). There are also pages with no data in the table too.

After a while I found a solution that first looks to work; the report is generated and the page is rendered correct. I'm using a combinig reporter and two local reporter - one for each variant.
This is a part of the report code - it displays the field "PC_SW" of every page:



But when I looked into the confluence log file i saw that there are many error like this:
2016-08-29 09:45:02,891 ERROR [http-bio-8090-exec-2040] [macro.query.mutate.CombiningQuery] apply Unable to perform query. Skipping this query.
 -- url: /confluence/pages/viewpage.action | userName: bernhard | action: viewpage | page: 26903929
com.servicerocket.confluence.randombits.reporting.core.query.QueryException: Supplier problem: null
It looks like there is a problem when the table data is empty or the named data does not exist :(

Is there another way to do this? How can I avoid the error accessing an empty table data collection?

Thanks and greetings from Austria

Bernhard
Photo of Bernhard Ploner

Bernhard Ploner

  • 59 Posts
  • 0 Reply Likes
  • frustrated

Posted 2 years ago

  • 1
Photo of Nurhana Ziana Bt. Hanafi

Nurhana Ziana Bt. Hanafi, Employee

  • 3500 Posts
  • 269 Reply Likes
Hello Bernhard,

Perhaps you may try to add {number-filter} inside your {local-reporter} e.g.
{number-filter:data:SW_Updates>collection:size|minValue=1}
This filter will check & return data only if your table has minimum 1 row. Hope this helps.


Thanks&Regards,
Ziana
Photo of Bernhard Ploner

Bernhard Ploner

  • 59 Posts
  • 0 Reply Likes
Hi Ziana!

Thanks for your response; I've already tried this!

But when I do it I do not get any data - only get the report empty text for every line (sub-page).
Looks like the number-filter doesn't work correct in this constellation.

It's very hard to find out what's going wrong here; therefor I suggested the debug functionality in another thread:  https://community.servicerocket.com/servicerocket/topics/debug-feature-for-reporting-plugin
Would be very helpful to have it :)

Thanks & greetings from Austria
Bernhard