EngineerTable Support

Introduction

EngineerTable allows the presentation of iSheet tables in HighQ Home or Wiki pages.

Prerequisites

Installation

Download engineerTable.zip and extract the contents (engineerTable.js, engineerCore.js)

Upload both files to your HighQ instance in the System Admin File Library - This can be reached by clicking the profile picture/icon in the top right of your HighQ Instance > System Admin > File Library. Click “Add new file” and select each of the files to upload.

Copy each of the URLs for the uploaded files, we'll need to reference these when using the list in each HighQ site. Right click on the file in the filename column and click copy link then paste the link into a new text or Word document to keep them handy, you can use the format below. DO NOT use the Get Link/Public link column, this will make your file publicly accessible.


  • EngineerCore URL:

  • EngineerTable URL:


Updating your version

When new versions become available download the updated js files provided. Then, in your HighQ instance, navigate to the System Admin File Library and locate your existing engineerTable.js install. Clicking on the file ID to the left of this filename will open the "Update file" page, allowing you to replace the older file with the updated one you just downloaded. BEWARE: this overwrite happens immediately upon clicking Save and is irreversible. Ensure you are overwriting the correct file by double checking the File name field before clicking Choose File. It is advisable to always have backups of all files stored in the System Admin File Library.

After updating the file it can sometimes take a a little while to update for all users if their browsers are caching older code, if any user reports issues advising them to clear their cache using CTRL + SHIFT + R to do a hard refresh of the page.

Adding a table to a HighQ site

You’ll need iSheets and either the Home or Wiki modules available in your site.

  • Create an iSheet with the columns and data you want to display on your home page

  • Create a new view your iSheet called Home Page and ensure only the columns you want displayed are included

  • Save your view.


Add to your Home/Wiki page

Go to the Home or Wiki page where you would like your table to appear. Edit the panel and select Source view.

Use the HighQ editor to add a link to your iSheet view (more help here: Add a link to a page with the rich text editor - Thomson Reuters HighQ Knowledge)

Once you've created your link, open the panel in Source view and paste in the below minimum code needed to run – the “flag_” links will need to be replaced with your links from the installation section.


<div id="tableContainer1"><script>

engineerTable({

tableElement: 'tableContainer1',

});

</script><!-- EngineerCore --><script src="./flag/flag_50i54j53i54h51k53k54.action"></script><!--EngineerTable--><script src="./flag/flag_50l53n55j49j57k51i50.action"></script></div>

Click Ok and then Save and your table should appear.

You can hide the link to your iSheet view if you don't want it to be visible by opening the Source view again, and locating this bit of HTML:

class="CKContextLink" and adding a space inside the last double quote and adding the word "hidden" so: class="CKContextLink hidden"

Modifying Options

The code for each table can be modified by setting the options, these are the lines of code ending in a comma (,) between the curly braces ({}) after “engineerTable”. Each line changes or provides information to a different component of the table. Details of all the options available are listed in the Advanced Configuration section of this guide.

To add a new option, add a new line after the last comma and before the last curly brace and add your option line as below.

Warning: HighQ does not keep a version history of your edits to code in Home pages so it's good practice you save your code into another window such as notepad before making changes in case you need to roll back.

tableElement: 'tableContainer1', <<ADD NEW LINE HERE>>

});


For example, if you wanted to limit your table widget to only show the top 10 rows from your iSheet you could use the recordLimit option.

We would add a new line to the code above, add our option, then a colon (:) then a single quote (‘) then the number of rows you want to limit the widget to, then another single quote and comma.


tableElement: 'tableContainer1',

recordLimit: ‘10’,

});


FAQs

Can I have multiple tables on the same page?

Yes! Follow the instructions for adding a table to a HighQ site above then ensure the "tableElement" required option on your new table is different to any other tableElements on the page. This could mean counting up to tableContainer2 for your second table etc. You must also update the line of HTML <div id="tableContainer2"> to match.


How do I set the width of a column?

The table will dynamically resize to the fit the width of the page but the columns will be proportional to their widths set in the iSheet itself.


Advanced Configuration

This section lists all the possible options that can be used to modify the standard behavior of the table. See “Modifying Options” section for instructions on using these.


Required Options


The below options MUST be included for the table to load.


tableElement

e.g.

tableElement:'tableContainer1',


Tells the code where you want the table to appear on your page. It requires a corresponding HTML element similar to <div id="tableContainer1">&nbsp;</div>

somewhere on the page. This div element can use any term between the quotes in the id= attribute as long as it corresponds exactly with the tableElement option value.


Configuration Options

The below options can be used to modify the behavior or look and feel of the table. They do not need to be set and can be removed to return them to their defaults.


headerColor

default: '#ffffff'

e.g.

headerColor: 'gray',


Sets background color of the header row of the table. Accepts HTML color names or HEX codes.


stickyHeaders

default: 'false'

e.g.

stickyHeaders: 'true',


When enabled then the table header will "stick" to the top of browser when scrolling down the page. Please note that this may conflict with HighQ's own sticky navigation bar and take precedence.


tableHeight

default: unlimited

e.g.

tableHeight: '600px',


Set the maximum height that the table will take up on the page. If the number of records exceeds this height then the component will display a scroll bar.


showLastModified

default: 'false'

e.g.

showLastModified: 'true',


Displays a last modified date of your iSheet data above your table by finding the latest modified date in your data. You iSheetViewLink view must contain the HighQ Modified Date column.


recordLimit

default: '0' (unlimited)

e.g.

recordLimit: '20',


Limits the number of records displayed by your table to the first x number in your iSheet view


selectedColumns

default: all

e.g.

selectedColumns: 'Name,Email,Modified Date',


Use a comma-separated list with no trailing spaces to name the columns from your data view that you want to display in your table. This is useful if you want to hide columns such as the Modified Date column from your table but still want to use the showLastModified option above.


recordLinks

default: 'false'

e.g.

recordLinks: 'viewItem',


Adds a button to the first column of your table that can perform one of several actions depending on the configuration option:


recordLinks: 'viewItem', - will open the HighQ view item modal window for the record selected

recordLinks: 'print', - will open the HighQ print preview pane for the iSheet record selected

recordLinks: 'isheet', - will navigate to the iSheet view filtered to just show the record selected

recordLinks: 'default', - will navigate to the iSheet of the record selected but the default view instead of the view chosen for the table



rowButtonText

default: 'More Details'

e.g.

rowButtonText: 'View',


When recordLinks above is set, rowButtonText can be used to set the text that appears on the button generated. Please note, this text can include emoji


rowButtonWidth

default: '100'

e.g.

rowButtonWidth: '60',


When recordLinks above is set, rowButtonWidth can be used to set the width of the button column in pixels.