You are viewing limited content. For full access, please sign in.

Question

Question

Need rows in a table labeled so that when I download a report data for rows is exported

asked on August 27, 2019

I've created a form to be used for productivity. The table needs 13 rows. Each of the 13 rows will have productivity reported on each weekday (5 columns).

 

Forms records the numbers entered, but the rows are not exported/downloaded when I download a report.

 

How can I get the rows in the tables to be labeled when exported in a report? (There is no data field/variable assigned to the row.)

 

 

ScreenShot082.jpg
ScreenShot082.jpg (153.69 KB)
0 0

Replies

replied on September 30, 2019

Here's one way to do it.

Add an extra column to your table, give it a name and variable that to you indicates that it is the column row identifiers.  Give it the CSS Class Name of "labelPlaceholderColumn".

Include this CSS with your form: 

/*hide the labelPlaceholderColumn fields*/
.labelPlaceholderColumn {display : none;} 
/*hide the header for the Label Placeholder Column - be sure to update the q # to match your field*/
#q1 {display : none;} 

 

Include this Javascript with your form: 

$(document).ready(function() {
  
  //Upon form load, copy the table row labels into the labelPlaceholderColumn fields
  $('.labelPlaceholderColumn input').each(function() { 
    $(this).val($(this).closest('tr').find('td').first().text()); 
  });
  
});

 

When the form is first loaded, whatever you populated for the row labels will copy into this new column (which will be hidden from view by the CSS).  Then you can include this new value in your report and it should give you the labels you need for your export.

1 0
replied on January 27, 2021

Thank you. It worked for a similar case I had in hand.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.