---
title: "Lusid.Portfolio.Holding.Property"
slug: "lusidportfolioholdingproperty"
updated: 2024-08-21T10:52:01Z
published: 2024-08-21T10:52:01Z
canonical: "support.lusid.com/lusidportfolioholdingproperty"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lusid.Portfolio.Holding.Property

| **Type** | **Read/write** | **Author** | **Availability** |
| --- | --- | --- | --- |
| [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | Finbourne | Provided with LUSID |

The `Lusid.Portfolio.Holding.Property` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that retrieves custom properties for [holdings](/v1/docs/holdings) in LUSID.

> **Note:** The LUSID user running the query must have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users) to both use the provider *and* read holding property data stored in LUSID. This should automatically be the case if you are the domain owner.

Note that, by default, the core [Lusid.Portfolio.Holding](/v1/docs/lusidportfolioholding) provider [does not retrieve properties](/v1/docs/how-do-i-configure-luminesce-entity-providers-to-readwrite-properties). You can use `Lusid.Portfolio.Holding.Property` to do so in conjunction with any other provider (including `Lusid.Portfolio.Holding`) to analyse all the data associated with holdings.

**See also:** `Lusid.Portfolio.Txn.Property`

## Basic usage

```sql
select * from Lusid.Portfolio.Holding.Property where <filter-expression>;
```

## Query parameters

`Lusid.Portfolio.Holding.Property` has parameters that enable you to filter or refine a query.

To list available parameters, their data types, default values, and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries):

```sql
select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Lusid.Portfolio.Holding.Property' and FieldType = 'Parameter';
```

## Data fields

By default, `Lusid.Portfolio.Holding.Property` returns a table of data populated with particular fields (columns). You can return just a subset of these fields if you wish.

To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries):

```sql
select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.Portfolio.Holding.Property' and FieldType = 'Column';
```

> **Note:** Fields marked 'main' are returned by queries that start select ^ from Lusid.Portfolio.Holding.Property...

## Examples

> **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples).

### Example 1: Retrieve custom properties for holdings across all portfolios

```sql
select * from Lusid.Portfolio.Holding.Property
```

### Example 2: Retrieve holdings that have a particular property and property value

You can select a particular property value for your filter expression, for example the New Investment order reason code.

```sql
select * from Lusid.Portfolio.Holding.Property where PropertyCode = 'OrderReason' and Value = 'New Investment'
```

### Example 3: Retrieve holdings that have a particular property value, and display instrument details

You can join `Lusid.Portfolio.Holding.Property` to an entity provider such as `Lusid.Instrument` to decorate holdings with particular instrument fields such as `DisplayName`.

```sql
select 
    i.LusidInstrumentId,
    i.DisplayName as InstrumentName,
    hp.PortfolioScope,
    hp.PortfolioCode,
    hp.SubHoldingKey,
    hp.Value as 'OrderReason'
from Lusid.Portfolio.Holding.Property hp
inner join Lusid.Instrument i
    on i.LusidInstrumentId = hp.LusidInstrumentId
where hp.PortfolioScope = 'Finbourne-Examples' and hp.PropertyCode = 'OrderReason'
```
