--- title: "Workflow.Task.Field" slug: "workflowtaskfield" tags: ["luminesce ", "task", "provider"] updated: 2024-08-21T13:39:14Z published: 2024-08-21T13:39:14Z canonical: "support.lusid.com/workflowtaskfield" --- > ## 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. # Workflow.Task.Field | **Type** | **Read/write** | **Author** | **Availability** | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | FINBOURNE | Provided with LUSID | Providing you have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users), the `Workflow.Task.Field` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that retrieves one or more fields and their current values for [tasks](/v1/docs/how-do-i-create-a-task) from the Workflow Service. **See also**: [Workflow.Task](/v1/docs/workflowtask), `Workflow.Task.Writer` ## Basic usage ```sql select * from Workflow.Task.Field where ``` ## Query parameters `Workflow.Task.Field` 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 = 'Workflow.Task.Field' and FieldType = 'Parameter'; ``` ## Data fields By default, `Workflow.Task.Field` returns a table of data populated with particular fields (columns). You can return a subset of these fields. 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 = 'Workflow.Task.Field' and FieldType = 'Column'; ``` > **Note:** Fields marked 'main' are returned by queries that select a caret character, for example `select ^ from Workflow.Task.Field`. ## Examples > **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples). ### Example 1: Retrieve all fields and their values for a particular task ```sql select * from Workflow.Task.Field where Id = '22ffcc7c-3ab6-48cd-9c31-1c702b04a95e'; ``` ### Example 2: Retrieve all tasks with a particular field value In this example, `Workflow.Task.Field` is used to retrieve any [data approval tasks](/v1/docs/how-do-i-create-a-task) that are currently assigned to a particular person. ```sql select * from Workflow.Task.Field where FieldName = 'assignee' and FieldValue = 'Joe Bloggs'; ``` ### Example 3: Create a notification for a particular field value In this example, `Workflow.Task.Field` is used to retrieve some data to approve from a particular task. The field value is then passed into [Notification.ManualEvent.Writer](/v1/docs/notificationmanualeventwriter) to trigger a notification that some new data needs approving. ```sql @@data_to_approve = select FieldValue from Workflow.Task.Field where FieldName = 'dataToApproveDescription' and Id = '22ffcc7c-3ab6-48cd-9c31-1c702b04a95e'; @data_to_write = select @@data_to_approve as Message, 'A new data approval task has been assigned' as Subject; select * from Notification.ManualEvent.Writer where ToWrite = @data_to_write; ```