UI Builder dashboard filter not working on Record list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
I am trying to build a dashboard in UI Builder and it needs to be in it for some other items that are to be added, so can't use the simple dashboard page that easily adds elements that just work OOTB.
I have added a record list that is looking at records on the - sn_risk_risk table. This works - shows all records without issue.
I then need to add a filter content item that works from the - sn_grc_profile table.
However I cannot get the filter to work with the record list. I have added the filter into the same content item right above the Record List Header, below it and also outside of the record list completely within the same container.
Nothing I have added has worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
The Entity Filter and Record List are on different tables. UI Builder components don't auto-discover each other — you need to explicitly connect them through event mapping or data binding. The Entity Filter emits a filter value, but the Record List doesn't know to listen for it unless you tell it to.
The wiring:
First, confirm the relationship field. The sn_risk_risk table should have a profile reference field pointing to sn_grc_profile. Open the table in the dictionary to verify the exact field name.
Then, set up a Client State Parameter (CSP) on your page — something like profileFilter of type string. This acts as the bridge between the two components.
Next, on the Entity Filter component, configure its event (typically the filter change/apply event) to update that CSP. The Entity Filter should emit either a sys_id or an encoded query when the user makes a selection.
Finally, on the Record List, data-bind the filter or encodedQuery property. You'd construct the value dynamically using your CSP, something along the lines of:
profile=<value from CSP>
or if the Entity Filter outputs multiple selections:
profileIN<value from CSP>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
@Naveen20 thank you for the reply, it conceptually makes sense, but on the other hand I don't quite understand at the same time.
- confirm the relationship field. The
sn_risk_risktable should have aprofilereference field pointing tosn_grc_profile. Open the table in the dictionary to verify the exact field name.- How do I do this? I have this exact same filter setup on a simple dashboard and it obviously works, but after looking at both tables and trying to find what you mean in the dictionary I cannot find it.
- How do I do this? I have this exact same filter setup on a simple dashboard and it obviously works, but after looking at both tables and trying to find what you mean in the dictionary I cannot find it.
- set up a Client State Parameter (CSP) on your page — something like
profileFilterof type string.- Do I need to add something to the "Initial value"?
- Do I need to add something to the "Initial value"?
- on the Entity Filter component, configure its event (typically the filter change/apply event) to update that CSP. The Entity Filter should emit either a sys_id or an encoded query when the user makes a selection.
- I select the "Entity Filter" component, then select "Events" then select "Add handler" and is it there I choose the "(typically the filter change/apply event" because I don't have that as an option, what I do have is "Cell filter applied" or "Apply column header filter" or "Column filter applied", not sure which to use?
- I select the "Entity Filter" component, then select "Events" then select "Add handler" and is it there I choose the "(typically the filter change/apply event" because I don't have that as an option, what I do have is "Cell filter applied" or "Apply column header filter" or "Column filter applied", not sure which to use?
on the Record List, data-bind the
filterorencodedQueryproperty. You'd construct the value dynamically using your CSP, something along the lines of:profile=<value from CSP>- If I choose the CSP that I made earlier it just hangs and shows no data at all, guessing it is because of a null value in the CSP initially?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Dropdown + CSP approach, step by step:
-
Add a Data Resource to your page — type GlideRecord, table
sn_grc_profile, return fieldssys_idand whatever display field you want (e.g.name). This fetches your profile records. -
Add a Dropdown component in your layout, outside the Record List (e.g. in the "top" container above it). Bind its options to the data resource results, mapping
sys_idas the value andnameas the label. -
Create a CSP called
profileFilter, type string, initial value empty. -
Wire the Dropdown's value-change event to "Update Client State Parameter" — set it to write the selected value into
profileFilter. -
On the Record List, data-bind the
filterproperty. Switch to script/formula mode and use:@context.props.profileFilter ? 'profile=' + @context.props.profileFilter : ''This shows all records when nothing is selected, and filters by profile when a selection is made.
Dropdown selection updates the CSP, CSP feeds the Record List filter, empty CSP means no filter applied. Test with one profile selection first to confirm the profile field name is correct on sn_risk_risk, and adjust the field name in step 5 if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
@Naveen20 your help and advice is really appreciated, but I just do not get what you are trying to get me to do?
For example - Add a Data Resource to your page — type GlideRecord.
There is not a specific type of "GlideRecord"
So not knowing which one to choose, means I don't how to add the rest of the options either.
