Not all columns are being exported to pdf using UI Action button?

Virendra K
Kilo Sage

Hi All,

 

I am trying to export related list tab data to excel/pdf sheet using UI Action button. Code is working as expected but last column of the list view is not being exported to the sheet. 

Why it's skipping the last column ? How I could fix it ?

 

Here is the script I am using,

 

function exportExcel() {
var checked = g_list.getChecked(); // get's the sys_id of the checked records
var query = "sys_idIN" + checked.toString();
var rows = checked.split(",").length; // rows to be sent to the excel function
var view = g_list.view;
var dialog = new GwtPollDialog(g_list.tableName, query, rows, view, 'unload_pdf');
dialog.execute();
}
 

VirendraK_0-1738943596265.png

 

output :

VirendraK_0-1738943953112.png

TotalCount is missing exported pdf,

VirendraK_1-1738944056713.png

 

 

Regards,

Virendra

1 ACCEPTED SOLUTION

@Virendra K 

Ensure you are in correct update set

Configure the list layout on that related list table and then add that and save.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

@Virendra K 

that's correct.

but did you open that in new tab, add the column in gear icon and then export?

See if that contains that column

Also add alert and see which view is coming here and if that field is present in that view or not?

var view = g_list.view;

alert(view)l

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

You are correct. Total count column was missing in the custom table view. I added it and worked out. 

but adding total count did not captured in update set. How I could capture it ?

 

Regards,

Virendra

@Virendra K 

Glad to know that my comment helped you resolve your issue.

Please mark my response as correct and close the thread.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Virendra K 

Ensure you are in correct update set

Configure the list layout on that related list table and then add that and save.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader