Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Filter Component default value in UI builder

Monika2
Giga Guru

I am trying to use the created data source in default value of filter component however, it is not working. Trying to add the default value as plans assigned to logged in user but I can see the default value as unavailable option.

Monika2_0-1714987940940.png

 

 

Data source selected in default value.

Monika2_2-1714988067467.png

@Ankur Bawiskar If you could help here.

 

Regards,

Monika

 

3 REPLIES 3

LuccaR
Tera Contributor

Any updates?

Hi LuccaR,

 

You need to create a transform Data Source to achieve this.

https://docs.servicenow.com/bundle/washingtondc-application-development/page/administer/ui-builder/c..., section "Types of data sources available in UI Builder"

 

Let me know if that helps.

 

Regards,

Monika

 

User5416
Tera Contributor

You can use the format below to set up the Default value. Below is an example of a Default value with a data source as the User table:

 

function evaluateProperty({
    api,
    helpers
}) {
    return [{
        "available": true,
        "empty": false,
        "id": "62826bf03710200044e0bfc8bcbe5df1",
        "label": "Abel Tuter",
        "unknown": false
    }];
}
 
Note: The Filter type is Single Select.