The CreatorCon Call for Content is officially open! Get started here.

default filter value in ui builder

Peter Xiang
Tera Expert

I have a filter that needs to filter the records of the goal table. Now I need to set the default condition of this filter and set the default value according to the current year. May I ask what value I need to return, because I tried to return the sys_id of fiscal year but it did not work.

PeterXiang_0-1703067935191.png

 

PeterXiang_1-1703068328712.png

 

 

4 REPLIES 4

Community Alums
Not applicable

Hi @Peter Xiang ,

Why are you hardcoding the sysID? you can simply select from the lookup.

 

Hi @Community Alums ,

 

I can choice FY23, but it is hardcoding, i want to set it dynamic, set default values based on the current year, but I don't know how to handle it.

Did you find the solution? Proposing to hardcode it end asking for a like is odd to say the least.

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.