+ Start a Discussion

Views: using Contains in filter

Hi, I'm just making my way through the Trailhead modules and found a pre-made Leads view that filtered on "Lead Status does not contain 'closed' ".

I removed this filter and attempting to add it again, I can only choose specific values from the Lead Status field, not just type 'closed' as a string so using this view, it might not be future proof if values change in the future (thinking of this for other fields too).

Can front-end users not specify text strings to use with Contain and pick-list fields when editing views? Would this view/filter have been coded in the backend somehow, not created from the users view? Thx.

I think you can type as a string like "Closed" or click on look up and select closed lead status field and share with the users you want to share then save the view. If you want to change/add the lead status picklist values, go to lead fields and edit lead status field and add a new value called "Closed" or edit existing value to something else you want. 

Thank you

Thanks, but there is nowhere to type a text value, only select the specific picklist values which makes it not future-proof or will lead to lots of clicking if there are lots of values.

I'm puzzled why this was in place in the playground when it was created, but I can't recreate it!

I don't need to update the actual field values, just return any values that contains the text 'Closed'.. e.g. 'Closed Converted' or 'Closed Not Converted'. 

User-added image

Edit: I have managed to do this, but only by switching to Classic experience, editing the filters using the quite frankly more powerful interface, then switching back. Is this the only way to have full access to the filter logic? This seems crazy that Lightning has less functionality than Classic.

User-added image