1

I need to pass the current user name in the filter for Contains condition - Whenever passing [Me] it gives error: Filter value is not a valid text string.

enter image description here

2
  • Is the PoC field a people picker?
    – wjervis
    Apr 18, 2017 at 13:55
  • @wjervis No, it is Single line of text auto generated from the Infopath field. Apr 19, 2017 at 15:16

2 Answers 2

2

The List View filter value for the people or group field it takes [Me]. It works for Created By in your screenshot. If the PoC field is a text field there is no way you can pass the current user name.

You need to add a "Current User Filter" web part along with list view web part and connect both web parts.

  • Go to page where you have list view web part added.
  • Add "Current User Filter" web part under "Filters" section in the web parts gallery to the same page.
  • Click down arrow on web part and click "connection" and select your list.
  • And configure the connection.

Below MSDN article explains the complete steps https://support.office.com/en-us/article/Connect-a-Filter-Web-Part-to-a-Data-View-Web-Part-bc10362e-afaa-42dc-b09e-ba8b1b83bb3c?ui=en-US&rs=en-US&ad=US#bms4

1

You can't do that out of the box, but it would be rather easy to write a javascript to take the logged in user from the _spPageContextInfo object and use that as a filter. But if you want non-code solution the answer from VenKat is better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.