---
title: "Installed Product Creation"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/5377196033/Installed%20Product%20Creation"
format: markdown
---
## Sample Structure

**InstalledProductCreation** screen contains information that is being used during creation of a new Installed Product for location-based work order  
Check screenshots below:

![image](media://7cec8a12-2107-4810-bd81-b54ca813a966)

![image](media://8ac61233-9792-4903-a922-789d576af628)

![image](media://c500001b-0ac7-4b67-a7b6-8c1f8e6eea3c)

![image](media://adcc805f-52a9-4d8f-af4f-8ea2c7903f9f)


---


Below is sample structure for the screen. Basically it consists of two elements:

- `header` - label shown on top of the screen (Step 2 and Step 4)
- `label` - label shown on top of the screen (Step 3)
- `table` - API object Name (should always be `FIELDBUDDY__Installed_Product__c)` and should newer be changed
- `events` - what should happen if record is selected. Do not change it
- `geoLocation`- deprecated feature, can be ignored
- `fieldsToRequest` - arrays of fields that could be populated for new Installed Product
- `limit` - see below
- `sourceTable` - see below
- `sourceFields` - see below
- `layout` - see below
- `orderByField` – see below

fieldsToRequest has few properties that could be changed (white background). 

In case if a field is a type of a Lookup (reference) - it is also possible to describe how selection of a record (For example – FIELDBUDDY__Product__c) looks on step 3

| **Property** | **Description** | **Default Value from Reference Configuration (if not specified → empty)** |
| --- | --- | --- |
| `field` | API name of a field to be populated<br>Should be `FIELDBUDDY__Product__c` | `"field": "FIELDBUDDY__Product__c"` |
| `table` | API name of a Table, where record should be created<br>Should be `FIELDBUDDY__Installed_Product__c` | `"table": "FIELDBUDDY__Installed_Product__c"` |
| `online` | determines of records are searched online.  
Should be true for Reference (Lookup) fields | `"online": true,` |
| `preselected` | Should be true for reference to `FIELDBUDDY__Location`  
Should not be changed | ```json
"preselected": true,
``` |
| `readOnlyFromConfig` | Should be true for reference to `FIELDBUDDY__Location`  
Should not be changed | ```json
"readOnlyFromConfig": true,
``` |
| `required` | Determines if field value is required to proceed,<br>Should be true for  Location reference | `"required": true,` |
| `limit` | Determines the amount of records that will be returned in search | `"limit": 15,` |
| `sourceTable` | Describes the table from which you want to retrieve your fields | `"sourceTable": "FIELDBUDDY__Product__c"` |
| `sourceFields` | Describes the fields in the table which retrieved data will contain. It should only contains fields that exist in the briefcase. The default contains all fields in the table.<br>**Notes**<br>- Source fields with a numeric type (`DOUBLE` etc.) are currently not supported.
- Not all source fields are searchable using the search bar in swift, even though they will be displayed to the user. Only source fields with `STRING` and similar types (`EMAIL`, `PHONE` etc.) are guaranteed to be searchable. | ```
  "sourceFields": [
    "Id",
    "Name",
    "CreatedDate",
    "CreatedById",
    "LastModifiedById",
    "OwnerId",
    "FIELDBUDDY__Manufacturer__c",
    "FIELDBUDDY__Product_Group__c",
    "FIELDBUDDY__Product_Code__c",
    "FIELDBUDDY__Model__c",
    "FIELDBUDDY__Product_Type__c",
    "FIELDBUDDY__ExtID__c"
  ]
``` |
| `layout` | Describes layout of the each single element in the selection list, with keys corresponding to rows of layout, and values corresponding to a tuple. This tuple contains labels and item details as string templates. First item of the tuple is for label template, second is for item details template.<br>For an item detail template to be parsable by Swift, it should contain be one of the provided values in the `sourceFields` array. Example: `"${Name}"`<br>For a label template to be parsable by Swift, it should follow the following scheme: `<sourceTable>.<sourceField>.label` . Example: `"${FIELDBUDDY__Product__c.Name.label}"`<br>If no layout is defined, the default layout only displays the name of the product or installation.<br>If the parsed item detail is empty (i.e. empty field), the row is not displayed. | ```
  "layout": {
    "Row0": ["${FIELDBUDDY__Product__c.Name.label}", "${Name}"]
  }
``` |
| `orderByField` | Describes how the items are sorted when displayed. The values present in this array should be present in sourceTable field as an item.<br>**Notes**<br>- Sorting by multiple fields is supported. In the following example, items are sorted by name first, and among those items with the same name, items are sorted using the product code.<br>- The ordering is ascending by default (0 → 9, A → Z, a → z). Descending order is not supported at the moment. | `undefined` |

---

Reference Config:

<details>
<summary>Expand</summary>

```
{
  "config": {
    "header": "${Label.CreateInstalledProduct}",
    "label": "${Label.InstallationData}",
    "table": "Installed_Product__c",
    "events": [
      {
        "eventName": "main",
        "privileges": true,
        "eventType": "createable",
        "targets": [
          "FIELDBUDDY__Installed_Product__c",
          "FIELDBUDDY__Work_Order_Line_Item__c",
          "FIELDBUDDY__Work_Order_Item__c"
        ]
      },
      {
        "dataBinding": [
          {
            "field": "Name",
            "table": "FIELDBUDDY__Work_Order__c",
            "var": "NAME"
          },
          {
            "field": "Id",
            "table": "FIELDBUDDY__Work_Order__c",
            "var": "ID"
          },
          {
            "field": "Id",
            "table": "FIELDBUDDY__Installed_Product__c",
            "var": "IP"
          }
        ],
        "eventName": "addItems",
        "staticBinding": [
          {
            "value": "Activity",
            "var": "TEMPLATE_TYPE"
          },
          {
            "value": "Location",
            "var": "TEMPLATE"
          }
        ],
        "goBack": "InstalledProductCreation",
        "target": "WorkOrderItems",
        "triggeredEvent": "navigate"
      },
      {
        "dataBinding": [
          {
            "field": "Name",
            "table": "FIELDBUDDY__Work_Order__c",
            "var": "NAME"
          },
          {
            "field": "Id",
            "table": "FIELDBUDDY__Work_Order__c",
            "var": "ID"
          },
          {
            "field": "Id",
            "table": "FIELDBUDDY__Installed_Product__c",
            "var": "IP"
          }
        ],
        "eventName": "createIP",
        "staticBinding": [
          {
            "value": "Activity",
            "var": "TEMPLATE_TYPE"
          },
          {
            "value": "Location",
            "var": "TEMPLATE"
          }
        ],
        "goBack": "InstalledProductCreation",
        "target": "WorkOrderItems",
        "triggeredEvent": "navigate"
      },
      {
        "dataBinding": [
          {
            "field": "Name",
            "table": "FIELDBUDDY__Work_Order__c",
            "var": "NAME"
          },
          {
            "field": "Id",
            "table": "FIELDBUDDY__Work_Order__c",
            "var": "ID"
          },
          {
            "field": "Id",
            "table": "FIELDBUDDY__Installed_Product__c",
            "var": "IP"
          }
        ],
        "eventName": "modifyIP",
        "staticBinding": [
          {
            "value": "Activity",
            "var": "TEMPLATE_TYPE"
          },
          {
            "value": "Location",
            "var": "TEMPLATE"
          }
        ],
        "goBack": "InstalledProductCreation",
        "target": "WorkOrderItems",
        "triggeredEvent": "navigate"
      }
    ],
    "geoLocation": false,
    "fieldsToRequest": [
      {
        "field": "Name",
        "table": "FIELDBUDDY__Installed_Product__c",
        "required": true
      },
      {
        "field": "FIELDBUDDY__Product__c",
        "table": "FIELDBUDDY__Installed_Product__c",
        "sourceFields": [
          "Id",
          "Name",
          "CreatedDate",
          "CreatedById",
          "LastModifiedById",
          "OwnerId",
          "FIELDBUDDY__Manufacturer__c",
          "FIELDBUDDY__Product_Group__c",
          "FIELDBUDDY__Product_Code__c",
          "FIELDBUDDY__Model__c",
          "FIELDBUDDY__Product_Type__c",
          "FIELDBUDDY__ExtID__c"
        ],
        "sourceTable": "FIELDBUDDY__Product__c",
        "limit": 15,
        "online": true,
        "required": true,
        "layout": {
          "Row0": ["${FIELDBUDDY__Product__c.Name.label}", "${Name}"],
          "Row1": [
            "${FIELDBUDDY__Product__c.FIELDBUDDY__Product_Code__c.label}",
            "${FIELDBUDDY__Product_Code__c}"
          ],
          "Row2": [
            "${FIELDBUDDY__Product__c.FIELDBUDDY__Product_Type__c.label}",
            "${FIELDBUDDY__Product_Type__c}"
          ],
          "Row3": [
            "${FIELDBUDDY__Product__c.FIELDBUDDY__Manufacturer__c.label}",
            "${FIELDBUDDY__Manufacturer__c}"
          ],
          "Row4": [
            "${FIELDBUDDY__Product__c.FIELDBUDDY__Model__c.label}",
            "${FIELDBUDDY__Model__c}"
          ]
        }
      },
      {
        "field": "FIELDBUDDY__Location__c",
        "table": "FIELDBUDDY__Work_Order__c",
        "required": false,
        "online": true,
        "preselected": true,
        "readOnlyFromConfig": true
      },
      {
        "field": "FIELDBUDDY__Date_Installed__c",
        "table": "FIELDBUDDY__Installed_Product__c",
        "required": true
      },
      {
        "field": "FIELDBUDDY__Status__c",
        "table": "FIELDBUDDY__Installed_Product__c",
        "required": false
      },
      {
        "field": "FIELDBUDDY__Installed_Product_Number__c",
        "table": "FIELDBUDDY__Installed_Product__c",
        "required": false
      }
    ]
  },
  "name": "InstalledProductCreation"
}
```
</details>