FieldPropertyPath Interface @beta
A chain of property accesses that resolves to a primitive value that forms the basis of the displayed content of a FieldRun.
- The simplest property paths consist of a propertyName and nothing else, where
propertyNameidentifies - a primitive property.
- If
propertyNameidentifies a struct or array property, then additional accessors are required to identify the specific value. - If
propertyName(including any accessors) resolves to a string property of extended typeJson, such asJsonProperties, - then additional jsonAccessors are required to identify a specific value within the serialized JSON.
- Some examples:
- | Access String | propertyName | accessors | jsonAccessors |
- | ------------- | ------------ | --------- | ------------- |
- | name | "name" | undefined | undefined |
- | spouse.name | "spouse" | [name] | undefined |
- | colors[2] | "colors" | [2] | undefined |
- | spouse.favoriteRestaurants[1].address | "spouse" | ["favoriteRestaurants", 1, "address"] | undefined |
- | jsonProperties.contactInfo.email | "jsonProperties" | undefined | ["contactInfo", "email"] |
- | spouse.jsonProperties.contactInfo.phoneNumbers[0].areaCode | "spouse" | ["jsonProperties"] | ["contactInfo", "phoneNumbers", 0, "areaCode"] |
- A path using
jsonAccessorsmust end on a scalar (string, number, or boolean); a path that ends on an object, an array, - or a JSON
nullresolves to no value. - For example, to display a value stored in an element's
JsonProperties: - /** Create a field that displays the
contactInfo.emailvalue stored in the element'sJsonProperties. */ export function createJsonPropertiesField(elementId: Id64String): FieldRun { return FieldRun.create({ propertyHost: { elementId, schemaName: "BisCore", className: "PhysicalElement" }, propertyPath: { propertyName: "JsonProperties", jsonAccessors: ["contactInfo", "email"] }, }); } - Or, when the JSON property is reached through a struct member:
- /** Create a field whose JSON property is reached through a struct member.
accessorswalks the EC properties to theJson-typed string property;jsonAccessorsthen walks the parsed JSON. */ export function createNestedJsonField(elementId: Id64String): FieldRun { return FieldRun.create({ propertyHost: { elementId, schemaName: "MySchema", className: "Person" }, propertyPath: { propertyName: "spouse", accessors: ["jsonProperties"], jsonAccessors: ["phoneNumbers", 0, "areaCode"], }, }); }
Properties
| Name | Type | Description | |
|---|---|---|---|
| accessors | string | number[] | undefined | Property names and/or array indices describing the path from propertyName to the ultimate BIS property. | |
| jsonAccessors | string | number[] | undefined | If propertyName and accessors (if defined) resolve to a BIS string property of extended type Json, property names and/or |
|
| propertyName | string | The name of the BIS property of the FieldPropertyHost that serves as the root of the path. |
Defined in
Last Updated: 02 October, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.