0

In my list there is a column for email addresses and one for usernames. The email addresses are added through a workflow and are not necessarily the same as the ones stored in the user profiles.

I want to create a list view that is filtered to show only those entries where the current user's email address is the SAME as the email address supplied in the list.

Apparently, there is no variable that can be used in the regular list-view filter. And I can't figure out any way to get the current user's email address via calculated columns.

Maybe it's possible to use an xsl trick to fetch the current user's email address?

How can I do this? Is there no way except to filter this via javascript after the page loads? There's no ootb method?

  • This is one slooooowwww QA site! And, in my opinion, Folks here are rather stingy with their upvotes and clarification comments. – bgmCoder Dec 10 '15 at 19:41
  • Hey.. as long as you are answering your own questions and commenting on them yourself as well.. Who are we to spoil your party. – Danny '365CSI' Engelman Dec 10 '15 at 19:59
  • hahahaa! Thanks Mr. Engelman - I'm just glad to know someone is out there besides me. Pleeeeeaaase spoil my party! I don't like my own answer. – bgmCoder Dec 10 '15 at 20:01
  • Process the list after it is displayed, hide the rows you do not wanna see. Maybe 2010 has the ctx.ListData.Row array like 2013 does. Do the row hiding with a fancy animation to make the user think something special is happening... hey.. its a party! – Danny '365CSI' Engelman Dec 10 '15 at 21:09
0

You could, during page load, use spservices and fetch the current user's email address as well as the one from the other column and then save the value into a designated column on the list. But you would have to force the page to reload so the value would be present in the browser and so that the list-view would filter on it.

This way the list would have a new value whenever someone visited the page, and your list-view could just filter on that value.

This would work, but you would have to have a loop for every item in the list, and you would also have the ugly page-reload.

Hopefully someone else has a better solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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