In Folio Custom Fields are the fields that have been added to the Folio Template or Entity/Contact by an Administrator.
These custom fields are typically where you will find the information you are looking for on an record.
To start you will need to find all of the fields on the Template or Entity/Contact Layout. To do this you will need to use one of the queries below to get the list of fields, from these you will need to take the libraryFieldID.
- For Folios use the folioFields Query
- For Entities use the entityFields Query
- For Contacts use the contactFields Query
For a more detailed breakdown on how you get the Field ID's see this article
Example Query
Now in the folios query you then add in an node called customFieldResponse with an array of libraryFieldIds from the fields query. You will then need to include an '... on' for each field type you have filtered for. There is a breakdown of all these options at the bottom of the article.
So in my example below I have used the folioFields query to find the libraryFieldIds for Incident Description and Incident Date, which are long text and date fields respectively. So my query would look like below
{
folios {
nodes {
key
title
id
# Incident Description # Incident Date
customFieldResponses(libraryFieldIds: ["MDBGaWVsZC0zNg", "MDBGaWVsZC0zNQ"]) {
field {
libraryFieldId
name
}
... on TextFieldResponse {
text
}
... on DateFieldResponse {
date
}
}
}
}
}Then the response i receive back would be like below
{
"data": {
"folios": {
"edges": [
{
"node": {
"id": "MDBDb250cmFjdC0yMjU",
"title": "Example Incident",
"key": "INCIDENTS-1",
"customFieldResponses": [
{
"field": {
"id": "MDBGaWVsZC0zNQ"
},
"date": "2026-11-20"
},
{
"field": {
"id": "MDBGaWVsZC0zNg"
},
"text": "Someone slipped on a wet floor"
}
]
}
}
]
}
}
}Please Note: You should only include the ...on for the field types you have, as they will all contribute to the complexity score of the query
Field Types Explained
Numeric Fields
|
|
Short & Long Text Fields
For both Short Text and Long text fields you can use the TextFieldResponse
For long texts the html styling will be included in the response
|
|
Date Fields
|
|
Time Fields
|
|
for time fields the time is it represented as a string, while hour and minute both represent the hour and minute as an integer
Single & Multi Select Fields
|
|
For select fields you have additional options under the fieldAnswer, which include:
- The answers ID
- If the answer is an default answer (meaning it is selected by default on new records but can be changed)
- If the text has freeform text (by using expanded)
- Any instructions on the answer
- The answers text
If you are finding that you are not getting any answers for your field then you should double check if the field is a lookup field, as those require different responses that are outlined below. You can check if it is a lookup on the fields query by adding lookupType
Address Fields
|
|
Attachment Fields
Attachments provide you with an URL for each of the attachments which can be used to download the attachment after first logging in
|
|
Signature Fields
Signature fields return a boolean to say if the signature box has been signed for this field
|
|
Lookup Fields
For lookup fields you are able to get the title and ID of the answer they have selected.
Location Lookup Fields
|
|
Program Lookup Fields
|
|
User Lookup Fields
|
|
Business Unit Lookup Fields
|
|
Folio, Entity and Contact Lookup Fields
For these three lookups the Response object allows you to query for all fields on the Folio/Entity/Contact that are selected as an answer, doing this will increase the complexity score so we would recommend if you want to get the values from Folio records in an lookup to use a second query to get those records responses.
|
|
Entity Lookup Fields
|
|
Contact Lookup Fields
|
|