How to script the filter component in the UI BUilder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-28-2024 01:35 AM
Hello everyone.
I'm asking your help how to script the 'Filter source' property in the filter component in the UI BUilder.
I created one state parameter with JSON type and tried to script the 'Filter source' property. Then I bound this state parameter to the 'Filter source' property of the filter component. But I didn't get desired result. Filter doesn't show result according to the encoded query.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-28-2024 01:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-29-2024 03:38 AM - edited ā05-29-2024 03:53 AM
Hi @Community Alums ,
Thank you for suggestion.
Yes, I know this doc. But in my opinion it haven't enough code examples to do my task.
But I found a solution. It is very simple. All you need to do is to script all entire under the 'value' property (you can look at my previous post).
This is the final script:
function evaluateProperty({api, helpers}) {
var query = "sys_idIN" + api.data.processing_groups.output;
return {
"type": "table",
"table": {
"id": "sys_user_group",
"label": "Group"
},
"encodedQuery": query
};
}
The 'processing_groups' is given as example. In my project it is implemented as a custom data transform resource to load values via system propery.
In my previous post I tried to use a state parameter. It is also possible. You neet to configure it as JSON type with object and set the value as under 'return' operator in the code example. Not sure about using data resource to configure the state parameter value. As for me script is more preferable. And it is possible in the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-18-2024 02:06 AM
How to need write this script client state parameters..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-21-2024 03:26 AM
Hi @Vadzim Surin1 ,
Try using the following result: