PCF Configuration Tool

From Resco's Wiki
Jump to navigation Jump to search
Warning Work in progress! We are in the process of updating the information on this page. Subject to change.

​The PCF Configuration Tool is designed to improve the setup of Resco Power Components that utilize JSON definitions. By providing a user-friendly interface, it allows users to input necessary configurations without directly handling JSON code.

Key features

  • Component Selection: Users can select the specific custom code component they wish to configure. The tool then adjusts its interface to align with the selected component's JSON schema, ensuring accurate and efficient configuration.​
  • Integration with Resco PCF Configuration Table: The configurator operates within the "Resco PCF Configuration" table. Users create a new record in this table and specify the target component to configure a component.
  • The result of the configuration is a JSON string. This string can be directly saved into the components configuration or copied to the clipboard.

How to import and set up the PCF Configuration Tool

PCF Configuration Tool is a custom code component used in the form of a custom table called "Resco PCF Configuration". This table is part of the solution. To add the configurator to the app:

  1. The solution is currently on-demand. For more information please contact Resco Support portal.
  2. Import Solution into your Environment.
  3. Create a new Model-driven app or edit the existing one.
  4. Add the Resco PCF Configuration table as a new page.
    add Resco PCF Configuration to the app
  5. Once added, the PCF Configuration Tool is ready to use.

How to configure components

Resco PCF Configuration works as any other table. To create a new component configuration:

  1. Create a new record in the table. The configurator component will appear in the record's form.
  2. Click the PCF Component dropdown and select the component you want to configure. The editor will automatically adjust to match the selected component’s JSON schema.

select which custom code components you want to configure in the pcf configurator tool

Scheduler (PCF)

The setup follows a similar structure to the Schedule Board but has some differences in entity mapping and status configuration.

Activity

The Activity section defines the entity and attributes the scheduler will use for scheduling activities.

Configurator1.png

  • Entity Logical Name: Specifies the entity for scheduled activities. This must be provided for the configuration to be valid.
Required attributes
  • scheduledstart: The start time of the scheduled activity.
  • scheduledend: The end time of the scheduled activity.
  • statuscode: Defines the schedule type, typically mapped to colors in the UI.
Optional attributes
  • Work duration
  • Activity started on
  • Activity ended on
  • Arrived on
Views
  • Multiple entity views can be defined with different data filters.

Activity Type

The Activity Type section defines status mapping and its associated colors. Here, users map the statuses of scheduled activities with built-in statuses recognized by the scheduler. These must align with the Activity configuration's statuscode attribute.

PcfConfigurator2.png

Resource

Defines the entity and attributes used for resources.

PcfConfigurator3.png

Required Attributes
  • Resource Reference: ownerid (Used to assign activities to a specific resource.)
  • Target: The specific target entity related to the resource.
Optional Attributes
  • Office latitude coordinate
  • Office longitude coordinate
  • Office address
Views
  • Multiple entity views can be defined with different data filters.

Source

Defines the entity and attributes used for scheduling sources.

PcfConfigurator4.png

Required Attributes
  • Source Reference: Defines the source entity for activities.
Optional Attributes
  • Source latitude coordinate
  • Source longitude coordinate
  • Source address
Views
  • Multiple entity views can be defined with different data filters.

Settings

Defines additional control options for the PCF Scheduler component.

PcfConfigurator5.png

Hierarchy control

The Hierarchy control is configured through a visual configurator. This tool provides an intuitive interface for defining the data structure and eliminates the need for manual JSON editing or complex setup.

Initial Setup

Begin by specifying the table and view to be displayed as Level 0 (root) of the hierarchy. The Configuration Name uniquely identifies the configuration record that the Hierarchy control will use.

Hierarchy Configurator initialization.png

Define Hierarchy

After setting the root table, define the structure of the hierarchy by adding parent and child relationships.

Hierarchy visconfig.png

Once complete, click the Save button to store the configuration.

Add configuration to the control

To link the configuration to the Hierarchy control:

  1. Navigate to the hierarchy control parameters.
  2. Insert the Configuration name into the Configuration parameter.
    Hierarchycontrolparameters.png

Show only related records

Additionally, to display only related records in the component, check "Show Related Records" in the component properties.
Showrelatedrecordsproperty.png

Visual Timeline

The configuration of the Visual Timeline involves selecting the Table, Start and End fields, Quick View form, and Views. The Configuration Name uniquely identifies the configuration record that the Visual Timeline will use.

VissualTimelineConfigurator.png

View filter definition

Each view requires slight adjustments depending on the type of visualization you need. You can define these filters in the View editor.
ViewFiltersedit.png


If we want to display activities directly related to Account (any table), use this filter:
Relatetoopp visualTimeline.png

Activities are often not directly linked to the Account but to the Opportunity related to the Account, for example. Therefore, we need to add another link to the filter:
RelatedtoOppToAcc visualTimeline.png

Limitations

  • Visual Timeline supports custom tables and activities; the only requirement is the date field.
  • There is no strict limit on the number of tables and views selected.
  • When both startField and endField are defined, these fields must contain data to be visualized on the Timeline.
  • Each view used in the timeline must have view filters defined.