---
title: "FProperties"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/4350672933/FProperties"
format: markdown
---
# FProperties

**FProperties** component is a component that show fields in a column, one by one.

Basically each element of it is referring to certain entity (table, for example Account, or Work Order or Installed Product), while each object inside is a field of that table (for example, `Name` of the account, or `FIELDBUDDY__Closure_Status__c` of the work order).

It is quite common and used in the following places

- [WorkOrderDetails](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5259100161) screen (`propertiesLayout`),
- Add/Edit Time registration screen,
- WorkOrderClosure screen,
- AdvancedChecklist (details as checklist) screen for Work Order Line Items,
- Installed Product details screen (MultiItems, first tab).

![image](media://2f1715d9-0bd8-4c56-9dd1-78f1ce10fdba)

---

## Sample Configuration

```json
{
  "config": {
    "sections": [
      {
        "iconName": "md-people",
        "iosIconName": "ios-people",
        "mapping": "Account",
        "title": "${Account.label}",
        "objects": [
          {
            "name": "Name"
          }
        ],
        "table": "Account"
      },
      {
        "table": "Contact",
        "iconName": "md-person",
        "iosIconName": "ios-person",
        "title": "${Contact.label}",
        "mapping": "Contact",
        "objects": [
          {
            "name": "Name"
          }
        ]
      },
      {
        "condition": [
          {
            "executor": "jsonQuery",
            "type": "filter",
            "source": "${DATA}",
            "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}]:isServiceRequestBased"
          }
        ],
        "iconName": "md-cog",
        "iosIconName": "ios-cog",
        "mapping": "FIELDBUDDY__Installed_Product__c",
        "objects": [
          {
            "name": "Name",
            "readonly": true
          },
          {
            "name": "FIELDBUDDY__Installed_Product_Number__c",
            "barcodeEnabled": true
          }
        ],
        "table": "FIELDBUDDY__Installed_Product__c",
        "title": "${FIELDBUDDY__Installed_Product__c.label}"
      },
      {
        "condition": [
          {
            "executor": "jsonQuery",
            "type": "filter",
            "source": "${DATA}",
            "formula": "FIELDBUDDY__Work_Order__c[Id=${CURRENT_WORK_ORDER}]:isServiceRequestBased"
          }
        ],
        "headless": true,
        "mapping": "FIELDBUDDY__Product__c",
        "objects": [
          {
            "name": "Name"
          },
          {
            "name": "FIELDBUDDY__Product_Type__c"
          }
        ],
        "table": "FIELDBUDDY__Product__c"
      }
    ],
    "type": "FProperties"
  }
}
```

Below are the sample structure of the FProperties:

| **Property** | **Description** | **Value** | **Default** |
| --- | --- | --- | --- |
| **sections** | Array of elements with structure described below.<br>An element with `url` is a button, see [Buttons](#buttons-open-a-salesforce-page-or-web-page). | ```
{
    "iconName": "md-people",
    "iosIconName": "ios-people",
    "mapping": "Account",
    "title": "${Account.label}",
    "objects": [
        {
            "name": "Name"
        }
    ],
    "table": "Account"
},
``` | [] |

Each element should contain following properties:

| **Property** | **Description** | **Value** | **Default** |
| --- | --- | --- | --- |
| **iconName** | icon name for Android devices. More about icons here - [Icons](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5249826918) | `"iconName": "md-people"` | empty |
| **iosIconName** | icon name for iOS devices. More about icons here - [Icons](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5249826918) | `"iosIconName": "ios-people"` | empty |
| **mapping** | Describe entity name, for which information is shown. Should be same as “table” property | `"mapping": "Account",` | empty |
| **title** | Label of the header. Standard, Custom labels or hardcoded text can be used | `"title": "${Account.label}",` | empty |
| **objects** | array of fields from the table to be shown | array of elements, described below | [] |
| **table** | Describe entity name, for which fields are shown. Same as sObject name in salesforce | `"table": "Account"` | empty |
| **definedPath** | Allows to specify a custom path defined in `defaultPaths` - <[https://help.fieldbuddy.com/space/FBDOCS/5671190536/rules](https://help.fieldbuddy.com/space/FBDOCS/5671190536/rules) > | `"definedPath": "FIELDBUDDY__Sub_location__c"` | empty |
| **headless** | Boolean, if true – title (and header row respectively) is not shown | `"headless": true` | `false` |
| **condition** | Support conditional rendering of each respective section | array of conditions from [Filter Logic, Validation and Formulas](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5250023575) | [] |
| **url** | Turns the element into a button. See [Buttons](#buttons-open-a-salesforce-page-or-web-page). | `"url": { "isVisualForce": true, "endpoint": "/apex/WorkOrderSummary" }` | empty |

### objects properties

Each element of Object property represents a field on respective entity in salesforce that is being shown.

> ✅ To open a page from FProperties, use a [button](#).

> ⚠️ `format` works only for read-only fields. If it is configured for non-read-only field, changes of that field will not be properly saved

```json
{
    "name": "Name",
    "readonly": true,
    "label": "${FIELDBUDDY__Service_Agreement__c.label}"
}
```

| **Property** | **Description** | **Value** | **Default** |
| --- | --- | --- | --- |
| **name** | API field name of an object | `"name": "Name",` | empty |
| **label** | Allows to override label of a field. A label works only for virtual fields. All other fields use the label defined in their metadata. | `"label": "my special field"` | Label of a field |
| **readonly** | Allows to enforce field to be always read only | `"readonly": true` | false |
| **format** | Allows to specify format of the field. This feature works only for read-only fields. If it is configured for non-read-only field, changes of that field will not be properly saved, so do NOT change it. Supported for date or date/time fields for read-only format | `"format": "DD-MM-YYYY"` | empty |
| **barcodeEnabled** | Allows to show Barcode scanner. Only the following types are supported: `["STRING", "TEXTAREA", "TEXT", "DOUBLE", "CURRENCY"]` | `"barcodeEnabled": true,` | false (unless in rules set to true) |
| **virtual** | Allows to create formulas, which will be read only, and not saved to Service Center | `"virtual": true` | false |
| **persistentFormula** | determines if value of the field is a formula. If checked, **readonly** must be true as well | `"persistentFormula": true,` | false |
| **formula** | JS formula that will evaluate to the value of field. A `var` from `params` that is used more than once in the formula is replaced everywhere. | ```javascript
"formula": "f=()=>{try{let e= new Date('${E}'.split(' ').join('T')); e.setSeconds(0,0);let s= new Date('${S}'.split(' ').join('T')); s.setSeconds(0,0);let minutes= (new Date(e.toUTCString()).valueOf()-new Date(s.toUTCString()).valueOf());  minutes = minutes/1000/60; if(minutes <=0){return '-';}   var h = Math.floor(minutes / 60);var m = minutes % 60; return h + ' h '+ m + ' min'; } catch(ex){return '-'}};f();"
``` | empty |
| **params** | Information that can be used in formula | ```json
{
    "virtual": true,
    "name": "Duration__c",
    "label": "Duration",
    "params": [
        {
            "var": "${S}",
            "table": "FIELDBUDDY__Timesheet_Lineitem__c",
            "field": "FIELDBUDDY__Start_Time__c"
        },
        {
            "var": "${E}",
            "table": "FIELDBUDDY__Timesheet_Lineitem__c",
            "field": "FIELDBUDDY__End_Time__c"
        }
    ],
    "formula": "f=()=>{try{let e= new Date('${E}'.split(' ').join('T')); e.setSeconds(0,0);let s= new Date('${S}'.split(' ').join('T')); s.setSeconds(0,0);let minutes= (new Date(e.toUTCString()).valueOf()-new Date(s.toUTCString()).valueOf());  minutes = minutes/1000/60; if(minutes <=0){return '-';}   var h = Math.floor(minutes / 60);var m = minutes % 60; return h + ' h '+ m + ' min'; } catch(ex){return '-'}};f();"
}
``` | empty |
| **hiddenFormula** | object, determines if field should be shown/hidden | ```
"hiddenFormula": {
    "params": [
        {
            "var": "${T}",
            "table": "FIELDBUDDY__Timesheet_Lineitem__c",
          "field": "FIELDBUDDY__Type__c"
        }
    ],
    "formula": "f=()=>{return Boolean('${T}' === 'Reizen'); };Boolean(f());"
},
``` | empty |
| **default** | describes default value of the field for newly created records (like Work Order Line Items or Timesheet line items) | ```json
{
    "name": "My_WOLI_Field__c",
    "default": {
        "params": [],
        "formula": "f=()=>{try{let d1= new Date(); return d1.toISOString(); } catch(ex){}};f();"
    }
}
``` | empty |

### Example of field usage

Virtual Formula to show travel distance in KM – duration:

```json
{
  "virtual": true,
  "name": "Distance__c",
  "label": "Distance",
  "params": [
    {
      "var": "${S}",
      "table": "FIELDBUDDY__Timesheet_Lineitem__c",
      "field": "km_start__c"
    },
    {
      "var": "${E}",
      "table": "FIELDBUDDY__Timesheet_Lineitem__c",
      "field": "km_end__c"
    }
  ],
  "formula": "f=()=>{return (`${E}`-`${S}`) + ' km';};f();"
}
```

![image](media://0f5fe4de-f63f-40bc-97fa-0c4e7b5ea5ef)

Persistent formula that is saved to the Service Center:

```json
{
    "persistentFormula": true,
    "table": "FIELDBUDDY__Work_Order_Line_Item__c",
    "type": "DOUBLE",
    "name": "FIELDBUDDY__Unit_Price_Including_Tax_input__c",
    "readonly": true,
    "params": [],
    "formula": "f=()=>{ return 0; };Number(f());"
}
```

![IMG_22BBBDED72BD-1-20241028-153039.jpeg](media://afb2f1b6-c411-4915-8085-d7ae58a5af3a)

---

## Buttons (open a Salesforce page or web page)

A `sections` entry can be a **button** instead of a field section. Tapping it opens a Visualforce page or a web page in the in-app popup, with values from the current screen passed as URL parameters.

A button is an entry in `config.sections` that has a `url`. An entry without `url` is a normal field section, as described further below.

- **Where:** every FProperties screen listed above.
- **Placement:** a button sits at its place in the `sections` order, so it can be put between any two field sections.
- **How it opens:** always in the in-app popup.
- **Saving:** buttons don't affect saving. No field is written to the Service Center.

![Screenshot 2026-10-15 at 11.38.59.png](media://3922b248-bbc7-472a-9460-68cb7453261a)

### Example

```json
{
  "sections": [
    {
      "table": "FIELDBUDDY__Work_Order__c",
      "mapping": "FIELDBUDDY__Work_Order__c",
      "title": "${FIELDBUDDY__Work_Order__c.label}",
      "objects": [
        {
          "name": "Name"
        }
      ]
    },
    {
      "title": "${Label.WorkOrderSummary}",
      "iconName": "md-document-text",
      "url": {
        "isVisualForce": true,
        "endpoint": "/apex/WorkOrderSummary",
        "params": {
          "id": {
            "table": "FIELDBUDDY__Work_Order__c",
            "field": "Id"
          }
        }
      }
    },
    {
      "title": "Portal",
      "iconName": "md-globe",
      "url": {
        "isVisualForce": false,
        "endpoint": "https://portal.example.com"
      }
    }
  ]
}
```

The two buttons follow each other, so they share one row below the Work Order section.

### Button properties

| **Property** | **Description** | **Value** | **Default** |
| --- | --- | --- | --- |
| **title** | Button text. Standard, custom labels (`${Label.X}`) or hardcoded text can be used. | `"title": "${Label.WorkOrderSummary}"` | empty |
| **iconName** | Optional icon shown before the title. Without an icon the button is text only. More about icons here - [Icons](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5249826918) | `"iconName": "md-globe"` | empty |
| **iosIconName** | Optional icon, as in sections. Takes precedence over `iconName` when both are set. | `"iosIconName": "ios-globe"` | empty |
| **url.isVisualForce** | `true`: opens a Visualforce page, authenticated through the user's Salesforce session. `false`: opens a plain web page. | `"isVisualForce": true` | `false` |
| **url.endpoint** | Visualforce: a **relative** path, e.g. `/apex/WorkOrderSummary`. Web: an **https** URL (any host). | `"endpoint": "/apex/WorkOrderSummary"` | empty |
| **url.params** | Map of URL query parameters. Each value takes one of the four forms described below. | see below | `{}` |
| **condition** | Optional. Same as the section `condition`: an array of conditions from [Filter Logic, Validation and Formulas](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5250023575), evaluated against the current form data. The button is shown only when it passes. | array of conditions | empty |
| **webViewProps** | Optional. Properties passed to the popup's web view, the same as for [Applications](https://help.fieldbuddy.com/space/FBDOCS/5244452889/Applications#App-properties), e.g. inline media playback. | `"webViewProps": { "allowsInlineMediaPlayback": true }` | empty |
| #### **objects** | (to be deprecated after 4.5.0-latest).<br>On version 4.5.0-latest (fast ring), button configs must include an empty object property `[]` to prevent crashes for the same config on 4.5.0-stable (slow ring).<br>This property is no longer necessary in versions that come after 4.5.0-latest. | `[]` | empty |

`table`, `mapping`, `definedPath` and `headless` don't apply to a button and are ignored.

### `url.params` value forms

| **Form** | **Meaning** | **Example** |
| --- | --- | --- |
| `"text"` | Literal text, passed as is. | `"screen": "closure"` |
| `{ "table", "field", "format"? }` | Field value from the current form, **including unsaved edits** at the moment the button is tapped. `table` is required. `format` is an optional date format for date fields (default `YYYY-MM-DD`). | `"due": { "table": "FIELDBUDDY__Work_Order__c", "field": "FIELDBUDDY__Due_Date__c", "format": "DD-MM-YYYY" }` |
| `{ "constant" }` | Context constant: `${Constants.CURRENT_WORK_ORDER_ID}`, `${Constants.CURRENT_USER_ID}`, `${Constants.SELECTED_DAY}`, `${Constants.CURRENT_DATE}`, `${Constants.CURRENT_TIME}`. | `"user": { "constant": "${Constants.CURRENT_USER_ID}" }` |
| `{ "formula", "params" }` | Computed value. Same formula engine as `formula` on fields: `params` is the usual `{ var, table, field }` list, local to this one parameter. | see example below |

Example with all four forms:

```json
"params": {
    "screen": "closure",
    "id":   { "table": "FIELDBUDDY__Work_Order__c", "field": "Id" },
    "due":  { "table": "FIELDBUDDY__Work_Order__c", "field": "FIELDBUDDY__Due_Date__c", "format": "DD-MM-YYYY" },
    "wo":   { "constant": "${Constants.CURRENT_WORK_ORDER_ID}" },
    "user": { "constant": "${Constants.CURRENT_USER_ID}" },
    "distance": {
        "formula": "f=()=>{return ${E} - ${S};};f();",
        "params": [
            { "var": "${S}", "table": "FIELDBUDDY__Timesheet_Lineitem__c", "field": "FIELDBUDDY__Odometer_Start__c" },
            { "var": "${E}", "table": "FIELDBUDDY__Timesheet_Lineitem__c", "field": "FIELDBUDDY__Odometer_End__c" }
        ]
    }
}
```

**How values are passed**

- Checkbox (boolean) fields are passed as `true` / `false`.
- Date fields use `format` (default `YYYY-MM-DD`).
- Date/time fields are passed as ISO strings in UTC, e.g. `2026-10-09T13:04:52.000Z`.
- All values are URL-encoded, so text with spaces or `&` arrives on the page as is.
- An empty or missing value is **left out of the URL** (no `key=` and no `key=null`), so the page sees a real null. This also applies to:
  - a field of a table the screen doesn't load (in developer mode a warning is shown),
  - a formula that fails.
- A field parameter can only use tables the screen already loads through its field sections. Constants always work.

### Layout

- Buttons that follow each other in `sections` share one row. On a phone up to two fit per row, on a tablet up to four.
- A button that doesn't fit wraps to the next row; a button alone on its row takes the full width.
- Long titles wrap to at most two lines and are then cut off with `…`.
- Any field section between two buttons starts a new row. To break a row without showing fields, put an empty headless section in between:

```json
{ "table": "FIELDBUDDY__Work_Order__c", "mapping": "FIELDBUDDY__Work_Order__c", "headless": true, "objects": [] }
```

- A button hidden by its `condition` leaves no gap. If every button of a row is hidden, no empty row is shown.

### Behaviour

- **Offline:** buttons are disabled.
- **Visualforce session:** the user's session is refreshed before the page opens, so the user isn't asked to log in. If the refresh fails, the user is asked to relogin and the popup doesn't open. If a Visualforce button cannot be opened due to expired session, the user is instructed to close or save the checklist first.
- **Rejected endpoints:** a Visualforce button with an absolute URL (e.g. `<https://…`),> or a web button without `https`, doesn't open. Please make sure to use `https` while providing web buttons.
- **PDFs**: prefer not to directly expose PDFs in VisualForce pages, as Android devices will not be able to display these. Instead, render PDFs (or the information within them) in HTML format, if possible.