SetTargets Lightning Web Component: Customization Options


This page covers:


The SetTargets Lightning Web Component is a table that displays the Project Indicators available for Target data inputs. The Project Indicator data setup will determine which Project Indicators are available for Target data inputs by Target Frequency and Geographic Area.

This page details the customization options for the elements in the SetTargets Lightning Web Component.

Set Targets Table Customization Options

Project Indicator Hyperlinks

By default, the Project Indicators in the Set Targets table are hyperlinked to their related records. Mark the “Hide Hyperlink in First Column?” design attribute on Lightning App Builder as TRUE to remove the hyperlink and display the Project Indicators as plain text. 

Information Icon Pop-Up Fields

Each Project Indicator has an information icon in the Project Indicator column. Hovering over the icon displays a pop-up with additional information stored on the Project Indicator record. By default, “Objectives”, “Guidelines”, “Disaggregation Group”, and “Cross-Disaggregated by Sex” are shown. The information icon pop-up is controlled through the “ampi__SET_TARGETS_INFO_POPOVER” fieldset and this is where the desired pop-up fields can be defined.

Project Indicator Order

By default, all of the Project Indicators on the Set Targets table are listed in alphabetical order of their  “Indicator Definition” field.

  • To specify a different order in which the Project Indicators will display, use the field “STAR Project Indicator Order” on Project. This is a picklist field with values based on the fields that are available on the Project Indicator object. Choose a value in this field to display Project Indicators in alphabetically ascending order according to the selected field. This field will alter the order of the Project Indicators both on the Set Targets and the Add Results component.

  • For example, if the Project Indicators on Set Targets need to be displayed as per the ascending order of related Objectives that they are related to, select Objective in the “STAR Project Indicator Order” picklist on the Project record. 

  • In order to use the “ampi__STAR_Project_Indicator_Order__c” field, it should be added to the relevant page layout on the Project object. 

  • Additionally, the Project Indicators on the Set Targets table can be sorted by clicking on the Project Indicator column header. They can be shifted from ascending (a-z) to descending (z-a) and vice versa by clicking on the Project Indicator column header. 

Target Frequency and Geographic Area Dropdown Displays

The list of available Project Indicators that are available for entering Target data is determined by the “Target Frequency” and “Geographic Area” selections. This is defined on the Project Indicator level.

  • All Project Indicators which have a related Project Indicator Reporting Period record child to a parent Reporting Period record with same Target Frequency as  selected in the Target Frequency dropdown, and a related Project Indicator Geographic Area record child  to the selected Geographic Area will be displayed on the table. 

  • The “Target Frequency” dropdown will display the values in the “Target Frequency” field of all active Reporting Periods which have a child Project Indicator Reporting Period record related to one of the current Project’s Project Indicators.

  • The two fields that determine the frequency of Target data of a Project Indicator are the “Target Frequency” and “Reporting Frequency”  picklist fields. For more information on setting Frequency values refer to the Manage Indicators section in the User Guide. If an organization tracks a Project Indicator’s Targets and Results at the same frequency (Annual), they can choose to set only the “Reporting Frequency” field to Annual. That is, if the “Target Frequency” field is left blank, the “Reporting Frequency” field will be referenced as the Target Frequency.

  • The “Geographic Area” dropdown displays the values in the “Name” field of all active Geographic Areas that have a corresponding child Project Indicator Geographic Area record related to the current Project’s Project Indicators. 

  • It also displays parent Geographic Areas that have a child Project Indicator Geographic Area record related to the current Project’s Project Indicators. 

  • Geographic Areas are displayed in alphabetically ascending order.If a Geographic Area has a parent Geographic Area, it is grouped and sorted alphabetically under its parent Geographic Area with other Geographic Areas at the same hierarchical level. 

  • If parent Geographic Areas displayed in the dropdown do not have a corresponding Project Indicator, they are grayed out to indicate that they cannot be selected. 

  • Set Targets LWC is supported in systems with less than 50,000 catalog Geographic Areas. 

Search Bar and Filter Customization

As the text is entered into the Quick Search Bar, the search functionality filters down to those Project Indicators whose Indicator Definition or the fields added to the filterset contain the searched phrase. The search also accepts special character inputs.

Click on the “Show More Filters“ button to filter Project indicators on the Set Targets table on the basis of the following fields available out of the box:

  • Indicator Definition

  • Data Type

  • Thematic Area

  • Disaggregation Group

The fields that filter Project Indicators are controlled using the ampi__ST_SEARCH_FILTERS fieldset. The fields can be changed by updating the fields in the fieldset. 

The Project Indicators will only be filtered according to the values entered when “Apply filters” button is clicked. When the “Clear Filters” button  is clicked, the filters are all cleared and the table reverts to display all Project Indicators. 

Please note that when Quick Search and Filters are used together, the table displays only those Indicators which match both criteria: the text in the quick Search Bar and specified filter criteria.

Set Targets Data Entry Guidelines

The Set Targets component allows users to enter Targets for a Project Indicator across multiple Reporting Periods on the same table. 

If no Targets had been previously entered for a Project Indicator for that Geographic Area and Target Frequency, the Target data is saved into a new Result record.  If Targets had previously been entered for a Project Indicator for that Geographic Area and Target Frequency, the Target data is updated in the existing Result record. The Result record is not deleted but the Target data is cleared if the values are removed from the Set Targets table.

The following table references the fields where Target data is stored on the Result record:

Data Type 

Field 

Number, Currency, Percent 

Target Value 

Milestone 

Target Milestone Value

Qualitative

Target Qualitative Value

Picklist 

Target Qualitative Value (if Picklist Indicator is not mapped to numbers) 

Picklist Target Numeric Value (if Picklist Indicator is mapped to numbers) 

Set Baseline for Project Indicators 

For the Baseline frequency to be displayed in the dropdown, the design attribute “Allow Users to Set Baseline?” on Lightning App Builder should be marked as TRUE. By default, this design attribute is TRUE. If a Baseline Reporting Period exists, but the design attribute is set to FALSE, Baseline will not be displayed in the dropdown. 

When Baseline is selected in the “Target Frequency” dropdown and a selection is made in the “Geographic Area” dropdown, all Project Indicators that have a baseline (i.e. the value of “Has Baseline” checkbox is set to TRUE) will be displayed in the Set Targets table. 

Ensure that the “Has Baseline?” checkbox field is marked as TRUE while creating/editing the indicator on the Manage Indicators page, to set a Baseline value for a Project Indicator. 

 

Non-Disaggregated Target Data

For non-disaggregated Project Indicators, Target data is auto-saved for each input field after the user enters a value and clicks out from the data input cell. 

Disaggregated Target Data

The Set Targets table also allows you to capture Targets for Project Indicators that are Disaggregated by Sex, Age, Income, etc. The fields that control disaggregation of Target data on the Set Targets table are:

  • Targets are Disaggregated?  

  • Cross-Disaggregation by Sex

  • Disaggregation Group 

These fields are populated while creating or editing a Project Indicator. 

Target values will be Disaggregated only when the “Targets are Disaggregated?” checkbox field is marked as TRUE while creating/editing an Indicator on the Manage Indicators page. If the “Cross-Disaggregation by Sex” checkbox field is marked as TRUE or the “Disaggregation Group” field has a value, but the “Targets are Disaggregated?” checkbox field is marked as FALSE, Results and Baseline will be Disaggregated, but Targets will not be disaggregated. 

Disaggregated Project Indicators for different data types have different displays.

For Quantitative Indicators, where Calculate Total is set to Don’t Sum Total: Total values are not displayed in an additional row or column. 

The following table displays how the disaggregated pop-up looks when the Project Indicator is disaggregated.

Disaggregation Type

How the disaggregated values are displayed in the popup

Disaggregation Type

How the disaggregated values are displayed in the popup

Cross-Disaggregated by Sex

Disaggregated by Group

Cross-Disaggregated by Sex and Disaggregated by Group 

For Quantitative Indicators, where Calculate Total is set to  Sum Total 

Indicators of Number and Currency Data Type 

The pop-up will display Total value(s) in an additional row or column or both. The Total values are auto calculated. The following table displays how the disaggregated pop-up looks when the Project Indicator is disaggregated.

Disaggregation Type

How the disaggregated values are displayed in the popup

Cross-Disaggregated by Sex 

 

Disaggregated by Group

 

Cross-Disaggregated by Sex and Disaggregated by Group

 

The Total value will be shown on the Set Targets table as a hyperlinked value.         

Indicators of Percent Data Type 

Data Type

Level of Disaggregation

How the disaggregated values are displayed inside the popup

How the total value/ icons is displayed on the Set Targets tablee 

Percent 

Cross Disaggregated by Sex 

The pop-up will display an input field for Total value (Summary Value) in an additional column. The Total value is not auto-calculated as sum of the Male, Female and Unknown Values. 

 

 

Until the Total value is not entered, a pencil icon is displayed on the Set Targets table. Once a Total value is entered, it is visible on the Set Targets table as a hyperlinked value. 

Percent 

Disaggregated by Group 

The pop-up will display Total value as an additional row on top of the disaggregated values.The Total Percent value is auto-calculated as a sum of the individual disaggregated values. 

Once Targets for disaggregated values are entered, the Total value is displayed as a hyperlink on the Set Targets table. 

Percent 

Cross Disaggregated by Sex and Disaggregated by Group 

The pop-up will display input fields for Total values (Summary Values) as additional rows in the table for each disaggregation value in the group. These are not auto-calculated as sum of the Male, Female and Unknown Values. 

Once these Total values (Summary Values) are entered, their sum is auto-calculated and displayed as a Total value in an additional row on the top. Total of all Male, Female and Unknown values in also shown in the row on top. 

A pencil icon is displayed when Targets are entered for each level of disaggregation. 

 

Once a Total value (Summary Value) is entered, it is shown on the Set Targets table. When all Total values (Summary Values) are entered the sum of all Total values is displayed on the Set Targets table

For Qualitative Indicators

For Qualitative Indicators, the pop-up accepts rich text input. The users can scroll vertically and horizontally to view all the disaggregated target inputs. Once a Target is entered, a pencil icon is displayed on the Set Targets table.

The following table displays how the disaggregated pop-up looks when the Project Indicator is disaggregated.

Disaggregation Type

How the disaggregated values are displayed in the popup

Cross-Disaggregated by Sex 

Disaggregated by Group

Cross-Disaggregated by Sex and Disaggregated by Group

For Milestone/Picklist Indicators

For Milestone/Picklist Indicators, the pop-up displays a dropdown for all the disaggregated values.It also allows users to scroll vertically and horizontally. Once a Target is entered, a pencil icon is displayed on the Set Targets table. 

Set Up Validation Ranges

Validation ranges for Indicators facilitate better data quality. This feature allows users to set a minimum and maximum value for Quantitative Indicators (where Data Type is either Number, Currency, or Percent) to be able to check if the values entered in the input fields are within the range of expected values. To utilize this feature, the fields “Validation Range Minimum” and “Validation Range Maximum” must be populated on  Project Indicators. 

By default, Validation Ranges are enabled in the Set Targets table. Mark the “Hide Validation Ranges?” design attribute as TRUE on the setTargets component in Lightning App Builder to disable them.  

In order to set validation ranges while creating and/ or editing a Project Indicator, please ensure that fields “Validation Range Minimum” and “Validation Range Maximum” are available in the ampi__ADD_NEW_INDICATOR_POPUP fieldset on the Indicator object and/ or  EDIT_PROJECT_INDICATOR_POPUP fieldset on the Project Indicator object 

If the target value entered is less than the value set in the Validation Range Minimum” field or more than the value set in the “Validation Range Maximum” field on the Project Indicator, a warning message appears at the top of the page and the input field is highlighted with an orange border. Please note that the target value is still saved in the Result record.

Users can click on the “x” on the warning message notification when it first appears and continue entering Target values. The message will not reappear if another value is entered outside the expected range once the warning message has been closed by the user, until the component is refreshed or if the user navigates away from the Set Targets component, returns to it and adds another value that is out of range.

Customize Submit Targets for Review Process

Once data entry is complete for Targets for a given Reporting Period, the “Submit” button can be used to lock the Targets. 

By default, the “Submit” button is visible on the Set Targets component. Mark the “Hide Submit?” design attribute as TRUE on Lightning App Builder to hide the button.                       

  1. Users are able to submit Targets for multiple Reporting Periods. For example, a user may need to submit Targets for Chile for quarter 2 and the semi-Annual report. They can select multiple Reporting Periods, enter data and then submit. 

  2. Users have the option to create workflows that trigger certain actions on the click of the Submit button. For example, clicking on the Submit button can set a specific Status and generate an email notification. On Click of “Submit’ on the Set Targets page, Target_Status__c = Submitted, thus making the Set Targets page uneditable.  To make the page uneditable when any other status is selected, the Target_Status__c field can also be configured through a workflow to edit the Targets_Locked__c field which can lock the Target input fields for the selected Reporting Periods and Geographic Area (un-editable so that users can no longer make any changes to the data entered).

  3. On the Set Targets page, the Targets are locked out and display as read-only when

    1. Target_Locked__c = TRUE ,or

    2. Target_Status__c = Submitted for the selected Reporting Period(s).

Considerations for the Refresh Functionality

Click the Refresh icon (as displayed in the screenshot below) on the Set Targets component to load and reflect the latest data on the Set Targets component along with all the Targets that have been previously recorded. For example, if the Project Indicator Definition is edited or a Geographic Area is marked Inactive, these changes will be reflected once the Set Targets component is refreshed. 

The Set Targets table will load with the previous selections made on the “Target Frequency” and “Geographic Area”dropdowns. It will also preserve the scroll position on the Set Targets table (both horizontal and vertical). 

If any changes are made on Manage Frameworks, Manage Indicators, or Add Results (either the Visualforce pages or the Lightning Web Component for all three), then the Set Targets Lightning Web Component will display a warning message alerting the user that the data on that page is not updated with the most accurate data. 

The user can then click on the Refresh icon to reload the component and display any data updates made on the related components.