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. Download the solution from [tbd].
  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