List layout for pdf export from portal widget

walshy
Giga Expert

When you export data from a table in the portal it uses the default list view you have set up. 

I have 4 different widgets with filters running off the same table, thus when any of those widgets are PDF exported they display the same list headings as each other and I cannot order the specific set.  

IS it possible to have multiple views in your scoped app in the list layout that you can have your widget point to on the pdf export? 

Here is the layout in the CMS

find_real_file.png

I only need the set order to show for the relevant widget as it needs to be ordered from 1 to 20 so the songs are in order. 

Hopefully this makes sense. 

Cheers!

5 REPLIES 5

charliesdev
Giga Expert

Great question, I'm having the same issue.  Did you figure it out?  Thanks.

 

Not yet, Im not sure where to go to set this up!

I'll be back if I come up with something 🙂

charliesdev
Giga Expert

My use case is that I have cloned the widget-data-table and am trying to get the PDF export to look like how I have the widget set up.  I have started to override the link in the HTML template:

<a ng-href="/{{data.table}}_list.do?{{::t.value}}&sysparm_query={{data.filter}}&sysparm_fields={{data.fields}}" target="_new">${Export as} {{::t.label}}</a>

The fields listed in the URL are the ones I want, but the PDF shows a different set of fields.  I removed the "&sysparm_view" because it was using the value 'sp' but it didn't make a difference.

I haven't even found the template that's being used to create the header for this export (it's going to be a long day).

It turns out, I was doing the opposite of what I needed to do.  Instead of getting rid of the sysparm_view and keeping the sysparm_fields, I created a view for the table and used it in the URL.  Now I get the columns in the exported PDF (whether I have sysparm_fields populated or don't include it at all).

Now to create a new schema option so I can specify the view in the widget options.  Good luck, hope this helps.