03-27-2019 06:46 AM
Hi All,
Is it possible to create a "Nested Filter" in a List. An Example would be, I have a List of type of stores in different regions. I want to be able Filter by Region and within that region select set be able to filter for the type of stores i Want to see from that List.
Kind Regards
Siya
Solved! Go to Solution.
03-28-2019 06:16 AM
Yes this is possible. The second filter will take its value from the first applied filter.
Below I have two fields from a list that are filterable Crime Type and Location. The filter for Location is based on what is selected value in Crime Type filter.
Here is XML for the two fields used as the list filter:
<FormField editable="true" label="Crime Type" name="RUCR_EXT_D" visible="list,filter" type="combobox" saveinsession="false" persisted="true" required="true" datatype="string" lov="SQL[select distinct RUCR_EXT_D from Crime order by RUCR_EXT_D]"/>
<FormField editable="true" label="Location" name="LOCATION" visible="list,filter" type="combobox" saveinsession="false" persisted="true" required="true" datatype="string" lov="SQL[select distinct LOCATION from Crime where RUCR_EXT_D={FILTER.RUCR_EXT_D}]"/>
Workflow result of this example:
04-03-2019 12:14 PM
Hi there sclow, is it possible to get the XML for the entire form? I can´t get the example to work.
first filter loads fine but second one won’t populate. The value " visible="list,filter" " is not working for me either and don’t know the query you are using to populate the list
04-04-2019 04:29 AM
Hi Stephen ,
Thanks for your response
I have configured the filter attribute as below :
<FormField name="DC_NAME" label="District Name" editable="true" visible="list,filter" datatype="string" lov="SQL[select distinct DC_NAME from Gauteng_POIs order by DC_NAME]" required="true" persisted="true" saveinsession="false" type="combobox" />
<FormField name="MP_NAME" label="Suburb" editable="true" visible="list,filter" datatype="string" lov="SQL[SELECT DISTINCT MP_NAME from Gauteng_POIs WHERE DC_NAME={FILTER.DC_NAME} order by MP_NAME ASC]" required="true" persisted="true" saveinsession="false" type="combobox" />
<FormField name="CAT_TYPE" label="POI Type" editable="true" visible="filter" datatype="string" lov="SQL[SELECT DISTINCT CAT_TYPE from Gauteng_POIs WHERE MP_NAME={FILTER.MP_NAME} order by CAT_TYPE Asc]" required="true" persisted="true" saveinsession="false" type="combobox" />
It seems to work , but sometimes it does not clear the selected filter properly. I havent managed to get the third filter column to display , I am trying to figure out what i might have missed.
Other than that it works . Thanks a lot
Kind Regards
Siya
04-04-2019 05:37 AM
Did you use the Crimes Table ?
04-04-2019 06:07 AM
Greetings,
I am happy to help out when and where I can.
Of course my example is meant to present the concept and provide a working example. It would need to be manipulated to a user's specific case.
I have attached the complete FormSettings.xml (in .zip) in hopes that it helps clarify any further questions with regards to this particular example of a nested filter. Be aware that it contains other components to this workflow that of course are not pertaining to this topic.
HTH
04-16-2019 12:59 AM - edited 04-16-2019 12:59 AM
Hello,
I tried to implment this method, but the only way I noticed it works is by using the following Steps:
Select Category Filter -> Apply Filter -> Reload Page -> Select Type Filter (Filtered by Category)
Expected behaviour:
Select Category Filter -> Select Type Filter (Filtered by Category)
The type filter does not seem to dynamically reload when the category filter is selected in the combobox (as it does in the form controller).
Did I miss something or is this just how it works?
Can it be configured so it matches my expected behaviour stated above?
Regards,
Radu
04-23-2019 03:10 PM
I agree, the content of the second combo box is not updated when the selected value changes on the first filter. The values from filter two are populated on load so if there is nothing selected in filter one at that time, then the second filter query wont pe processed correctly
04-25-2019 09:25 AM
Thanks users.
Upon further review, I have to agree this solution is only viable in specific workflow and maybe not even the expected workflow.
The first time through, it seems to hold up but the usefulness doesn't stand up over user iterations which of course should be expected.
No excuses, only that I didn't test it thoroughly enough. I'll take another look at it as soon as I can.
08-30-2019 01:04 AM
Hi Stephen ,
Can you also share the scripts related to to the workflow you shared.