Hide except from author

I know I should know this, but I am having a tough time with it.  Have an author field I want to have visible only to the author of the doc, that way they can add people they want to have edit rights on their own. How can I do a hide  to allow this field visible to only the original author. I am thinking of some sort of @UserName code.
jforget1Asked:
Who is Participating?
 
Bill-HansonConnect With a Mentor Commented:
Do you have the author's name captured in a field?  If not, you can use @Authors or $UpdatedBy to get the name of the author.  I like to include a "CreatedBy" field that is computed when composed (using @UserName) so that I don't have to rely on @Authors or $UpdatedBy since it's possible that both of these could return an empty string.

Whatever the source of the author name, you conditionally hide the field by right-clicking on the field and selecting "Field Properties" (or "Text Properties").  Switch to the "Hide When" tab and enter this formula in the "Hide paragraph if formula is true" field (also enable the checkbox).

CreatedBy != @UserName;

If you don't have a field that captures the author's name (CreatedBy in my case), you can add one of these lines to the code above to define CreatedBy...

CreatedBy := @Authors[1];
or
CreatedBy := $UpdatedBy[1];
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.