Effectively, the selection formula is checking that the FullName doesn’t have organizational units with “PS” or “TEACH”, and the LastName doesn’t have “User” or “USER”.
You are correct when you say that he is calculating office, but he is calculating it based on the [OU3] of the users full heirarchical name; which of course is an unknown quantity.
What he is saying is he only wants to see the documents where the appropriate character in the [OU3] is ‘P’.
This is quite the selection formula, here is how is breaks down:Set the region variable to be Organization Unit 2 of the full user name.
Set the office variable to be one character of Organization Unit 3 of the FullName, selected based on the region.
Set 3 different true/false variables based on if PS in the FullName, LOCAL is in the FullName, User/USER or TEACH is in the LastName.
Finally the actual view selection is for all documents where the Type field is Person, the office variable is calculated to be P, and any 1 of the 3 true/false variables are true.
The hardest part to figure out without seeing the data is where office is determined to be “P” or not, based on the region and different parts of the FullName. Hope this clears it up for you.