cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Table set default filter

truckla
Explorer
0 Kudos

Hi,

How can I set a default value in the filter of a SmartTable?

Accepted Solutions (0)

Answers (2)

Answers (2)

dhiraj_more
Participant
0 Kudos
<smartFilterBar:controlConfiguration>
<smartFilterBar:ControlConfiguration width="300px" key="credat" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false" mandatory="mandatory" index= '10' >											<smartFilterBar:defaultFilterValues>												<smartFilterBar:SelectOption operator="EQ" low="{parts:[{path : 'Date'}], formatter:'.formatter.creationDate'}" high="{parts:[{path : 'Date'}], formatter:'.formatter.creationDate'}" id="idDateLow"/>								</smartFilterBar:defaultFilterValues>											</smartFilterBar:ControlConfiguration>										</smartFilterBar:controlConfiguration>
truckla
Explorer
0 Kudos

Hi dhiraj.more ,

Maybe it makes a difference if I use a ResponsiveTable but it does not work for me. I have added it to the view. I can't debug it very well because I don't know how to debug a view.

The path (Date) is the column-name?

For what is the credat and formatter.creationDate

?

And should I put something in the controller?

dhiraj_more
Participant
0 Kudos

Hi Rick,

You can use something like this in smart filter bar Control Configuration in your view. I used it for date filter.

<smartFilterBar:defaultFilterValues>

<smartFilterBar:SelectOption operator="EQ" low="{parts:[{path : 'Date'}], formatter:'.formatter.creationDate'}" high="{parts:[{path : 'Date'}], formatter:'.formatter.creationDate'}" id="idMLReportDateLow"/> </smartFilterBar:defaultFilterValues>

Please let me know if it resolves your issue.

Thanks,

Dhiraj M

truckla
Explorer
0 Kudos

Hi dhiraj.more

were should I insert this?

between

<smartFilterBar:SmartFilterBar>

</smartFilterBar:SmartFilterBar>

?