Javascript Help Needed !

Really appreciate any help that can be given !

I have a SL360 product I am developing that has a list of titles that a user can select using checkboxes. Attached to each checkbox is a trigger that states :

  • Action : Adjust variable
  • Variable : Toggle BrandReputation_Sel1
  • When : When the user clicks 
  • Object : Check Box 1

The idea being that by default the checkbox is unticked (ie False which I have set as the variable default) and toggles to True if the user clicks the checkbox.

I have created a PDF using PDFMake and in the HTML file have listed all the variables as to how they should appear in a table format.  This works !

What I want to do though is edit the HTML file to add in Javascript if then else to say...

If  the BrandReputation_Sel1 value is true then show the row in the table else dont.


I have tried this, but it doesn't work....any ideas?

style: 'tableBody',
table: {
widths: ['*', '*', '*', '*', '*', '*'],
headerRows: 1,
dontBreakRows: true,
keepWithHeaderRows: 1,
body: [
[{text: 'Risk', style: 'tableHeader'}, {text: 'Event Identification', style: 'tableHeader'}, {text: 'Risk Assessment', style: 'tableHeader'}, {text: 'Risk Response', style: 'tableHeader'}, {text: 'Control Activities', style: 'tableHeader'}, {text: 'Monitoring', style: 'tableHeader'}],
if (BrandReputation_Sel1 == "true")
[{text: BrandReputation}, {text: BrandReputation_EI1}, {text: BrandReputation_RA1}, {text: BrandReputation_RR1}, {text: BrandReputation_CA1}, {text: BrandReputation_MO1}],



Be the first to reply