- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 05:40 AM
Hi All,
Can someone help me to understand that how to do event mapping between simple list and dropdown in app engine studio(UI Builder) as i would need to filter the records in simple list based on the selected value in the dropdown?
Your help is appreciated.
Thanks
Regards,
John Alexander
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 11:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 11:39 AM - edited 07-31-2023 11:41 AM
Here are the steps I would take to tie a dropdown value to a filter on a simple list component:
1. Create a client state parameter to store your dropdown value (you may want to set a default value depending on what field you're filtering on)
2. Add an event handler to your dropdown component that sets the value of the client state parameter when a dropdown item is selected
3. Tie the filter of your simple list to your client state parameter
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 11:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 10:59 PM
Can you help me to know how I can set this filter for Data Visualization Component?
Tried but couldn't find the similar filter to keep the client state variable
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 09:51 AM
I apologize for the late response. I got swept up in other work and didn't have time to look into this. But even if you no longer need an answer, I wanted to document what I've found in case it helps someone in the future.
Filtering with Data Visualization components is definitely more complicated. From what I can tell, there's no way to do this dynamically from the configuration options on the component. I had to go to the UX Macroponent Definition for the page (Developer > Page Definition) and change the Composition field JSON behind-the-scenes.
To start, you create your dropdown and your client state parameter, just like you did for the Simple List component. Next, you'll go to the UX Macroponent Definition for the page and search for your component ID in the Composition field (see images below).
Once you've found your Data Visualization component in the Composition JSON, you'll want to scroll down to the "filterQuery" property (propertyValues > dataSources > container > container > filterQuery). From there, you can change "filterQuery" to the following object:
"filterQuery" : {
"type" : "CLIENT_TRANSFORM",
"transform" : {
"operands" : {
"type" : "LIST_CONTAINER",
"container" : [ {
"type" : "JSON_LITERAL",
"value" : "category=" // or whatever field you're filtering on
}, {
"type" : "STATE_BINDING",
"binding" : {
"address" : [ "categoryDropdown" ] // or whatever your client state parameter's name is
}
} ]
},
"operator" : "CONCAT"
}
},
There are other ways you can set up "filterQuery" to accomplish your needs, this is just one example. I figured it out by referencing what the "query" property had in the JSON for my Simple List component, so if you wanted to make it more complicated, you could build it into the Simple List filtering and then copy the JSON from "query" in the Simple List to "filterQuery" in the Data Visualization.
It's definitely more technical, but it can be done! Hope it helps you or someone else out there!