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

Ankur Bawiskar
Tera Patron
Tera Patron

@Virendra K 

did you check that column is from which table? is it a dot walked column on list

Did you see the related list columns is personalized for some user?

May be the view doesn't have that Total count column but user has added that column by personalizing the List.

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

Hi @Ankur Bawiskar ,

Total count is belong to same table. it's not dot walked.

 

Regards,

Virendra

@Virendra K 

did you try to see by directly exporting the related list table using normal list and see if that column gets exported?

Also are you checking with admin?

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

Hi @Ankur Bawiskar 

I could not have an option to export it directly (snap).  Its custom table added in related list tab.

VirendraK_0-1739179163105.png