Can DetailList component do this?

%3CLINGO-SUB%20id%3D%22lingo-sub-391895%22%20slang%3D%22en-US%22%3ECan%20DetailList%20component%20do%20this%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-391895%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20the%20DetailList%20component%20filter%20by%20columns%3F%26nbsp%3B%3C%2FP%3E%3CP%3EI%20mean%20if%20I%20have%20a%20date%20column%20I%20would%20like%20to%20filter%20the%20columns%20which%20date%20has%20passed.%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20filter%20tool%20in%20the%20DetailList%20is%20more%20like%20a%20search%20tool%20which%20is%20not%20enough%20to%20make%20this%20kind%20of%20filtering.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%3C%2FP%3E%3CP%3EAmerico%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-391895%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-401299%22%20slang%3D%22en-US%22%3ERe%3A%20Can%20DetailList%20component%20do%20this%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-401299%22%20slang%3D%22en-US%22%3EYou%20can%20create%20one%20more%20column%20and%20it%20should%20be%20hide%20for%20users.%20and%20use%20calculated%20value%20in%20that%20column%20where%20date%20has%20passed.%20Next%20use%20the%20same%20column%20as%20filter.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-393258%22%20slang%3D%22en-US%22%3ERe%3A%20Can%20DetailList%20component%20do%20this%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-393258%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F117034%22%20target%3D%22_blank%22%3E%40Americo%20Perez%3C%2FA%3E%26nbsp%3BMaybe%20I'm%20not%20fully%20understanding%2C%20but%20you%20have%20a%20lot%20of%20control%20in%20how%20your%20data%20is%20filtered.%20That%20details%20list%20is%20just%20a%20rendering%20of%20your%20items.%20Your%20button%20isn't%20directly%20connected%20to%20your%20DetailList.%20Your%20DetailList%20should%20be%20getting%20the%20items%20from%20the%20state%20of%20your%20component.%26nbsp%3B%20Your%20button%20that%20is%20doing%20some%20filtering%2C%20should%20have%20the%20click%20event%2C%20which%20would%20subsequently%20filter%2Fsort%2Fchange%20the%20state%20object%20for%20your%20items.%3CBR%20%2F%3E%3CBR%20%2F%3EYour%20event%20could%20filter%20the%20*current*%20list%20of%20items%20in%20your%20state%2C%20or%20you%20could%20make%20a%20new%20call%20to%20SP%20to%20get%20a%20new%20list%20of%20items.%26nbsp%3B%20Either%20way%2C%20you%20just%20need%20to%20set%20your%20state%20based%20on%20that%20criteria.%20If%20in%20your%20case%2C%20you%20want%20to%20filter%20by%20today's%20date...%20you'd%20write%20the%20JS%20to%20filter%20out%20the%20current%20list%20and%20set%20the%20state%2C%20or%20make%20a%20call%20to%20SharePoint%20to%20get%20new%20items%20filtered%20by%20the%20date.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-392794%22%20slang%3D%22en-US%22%3ERe%3A%20Can%20DetailList%20component%20do%20this%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-392794%22%20slang%3D%22en-US%22%3E%3CP%3EThanls%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39836%22%20target%3D%22_blank%22%3E%40Beau%20Cameron%3C%2FA%3E%26nbsp%3Bfor%20the%20clarification.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20afraid%20that%20the%20filter%20functionallity%20OOB%20is%20not%20what%20I%20am%20looking%20for.%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20my%20web%20part%20I%20have%20a%20group%20of%20buttons%2C%20some%20of%20them%20re%20render%20the%20DetailList%20and%20show%20the%20results%20in%20groups%2C%20and%20some%20other%20buttons%20should%20filter%20the%20list%20when%20they%20get%20clicked.%20I%20have%20created%20the%20list's%20views%20to%20see%20how%20it%20should%20work%2C%20now%20I%20am%20stuck%20in%20getting%20the%20same%20funciontalliy%20in%20the%20Detailist.%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20list%20it%20is%20a%20column%20that%20shows%20agreements%20end%20dates%20and%20I%20have%20a%20listview%20that%20show%20only%20the%20rows%20which%20it%20date%20is%20older%20than%20today.%3C%2FP%3E%3CP%3EIn%20the%20detailList%20filter%20I%20can't%20find%20the%20way%20to%20do%20that%20type%20of%20filtering%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20even%20find%20the%20way%20to%20conect%20the%20button's%20click%20event%20to%20the%20DetailList%20in%20order%20to%20filter%20the%20list.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3EAmerico%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-391929%22%20slang%3D%22en-US%22%3ERe%3A%20Can%20DetailList%20component%20do%20this%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-391929%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F117034%22%20target%3D%22_blank%22%3E%40Americo%20Perez%3C%2FA%3E%26nbsp%3BThe%20filter%20works%20as%20you%20would%20expect%2C%20it%20just%20takes%20the%20current%20result%20set%20and%20filters%20the%20'name'%20column%20by%20the%20filter%20text.%20You%20could%20build%20your%20own%20date%20control%20if%20you%20want%20(or%20a%20drop%20down%20populated%20by%20the%20data%20in%20the%20list)%20and%20do%20similar%20filtering.%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20there%20anything%20that%20I%20can%20try%20and%20clarify%20to%20help%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Regular Contributor

Hi,

 

Does the DetailList component filter by columns? 

I mean if I have a date column I would like to filter the columns which date has passed. 

The filter tool in the DetailList is more like a search tool which is not enough to make this kind of filtering.

 

Best regards

Americo

4 Replies
Highlighted

@Americo Perez The filter works as you would expect, it just takes the current result set and filters the 'name' column by the filter text. You could build your own date control if you want (or a drop down populated by the data in the list) and do similar filtering.

Is there anything that I can try and clarify to help?

Highlighted

Thanls @Beau Cameron for the clarification. 

I am afraid that the filter functionallity OOB is not what I am looking for. 

In my web part I have a group of buttons, some of them re render the DetailList and show the results in groups, and some other buttons should filter the list when they get clicked. I have created the list's views to see how it should work, now I am stuck in getting the same funciontalliy in the Detailist. 

In the list it is a column that shows agreements end dates and I have a listview that show only the rows which it date is older than today.

In the detailList filter I can't find the way to do that type of filtering, 

I don't even find the way to conect the button's click event to the DetailList in order to filter the list.

 

Best regards,

Americo

Highlighted

@Americo Perez Maybe I'm not fully understanding, but you have a lot of control in how your data is filtered. That details list is just a rendering of your items. Your button isn't directly connected to your DetailList. Your DetailList should be getting the items from the state of your component.  Your button that is doing some filtering, should have the click event, which would subsequently filter/sort/change the state object for your items.

Your event could filter the *current* list of items in your state, or you could make a new call to SP to get a new list of items.  Either way, you just need to set your state based on that criteria. If in your case, you want to filter by today's date... you'd write the JS to filter out the current list and set the state, or make a call to SharePoint to get new items filtered by the date.

Highlighted
You can create one more column and it should be hide for users. and use calculated value in that column where date has passed. Next use the same column as filter.