Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Does chart have records

I have a chart the uses a set analysis to trap exceptions. I send this chart to excel and then email the excel file to a users to review the exceptions. This is all automated on reload. If the chart has no records (there are no exceptions today) I do not want to email an empty excel file. How do I determine if a chart has any records?

Thanks,

Stephen

1 Solution

Accepted Solutions
Not applicable
Author

Figured it out. Using:

set obj = ActiveDocument.GetSheetObject("CH01")
set v = ActiveDocument.Variables("vCountRecords")
  v.SetContent  obj.GetRowCount,true

if v.GetContent.string = 2 then
msgbox ("Don't Send Email")
else
msgbox ("Send Email")
end if

The 2 record count represent the caption and the totals line in the straight table, so only if there are 3 or more records is the actual data in the table.

Stephen

View solution in original post

1 Reply
Not applicable
Author

Figured it out. Using:

set obj = ActiveDocument.GetSheetObject("CH01")
set v = ActiveDocument.Variables("vCountRecords")
  v.SetContent  obj.GetRowCount,true

if v.GetContent.string = 2 then
msgbox ("Don't Send Email")
else
msgbox ("Send Email")
end if

The 2 record count represent the caption and the totals line in the straight table, so only if there are 3 or more records is the actual data in the table.

Stephen