How to set default value on a filter in UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 03:26 AM - edited ‎01-09-2024 03:27 AM
Hello Everyone,
I am working on a problem in UI Builder where I need to set a default value for a filter on a page using 'sys_id'. I'm not sure about the right format for this data. I tried many ways, but none seem to work. Also, this information isn't in the documentation.
I don't want to hardcode the value because my use case is different. Also, when I try using an object, the filter count increases, but it just keeps loading and doesn't work. Can anyone help me with the correct format for the data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 04:13 AM
HI @Dotychczas ,
Where is the filter? can you share a screenshot here please and also this is part of which workspace?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 05:05 AM - edited ‎01-09-2024 05:11 AM
It's on a custom page that we created. Here "Default value" script:
I need return value in here and I don't know what the format should be? Is format of the data returned in script depends on where filter is being placed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 06:06 AM
We opened a hi ticket on this. they provided this format and it works
1. Using static default value:
return [{
available : true,
id : "dfsdf7sd6f7sdf6dsf",
label : "Option 1"
},
{
available : true,
id : "7657765fsdfsdfsdf567",
label : "Option 2"
}];
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 02:14 AM
Did you find the solution for this? I have a similar requirement