I’ve searched the forum and see that there is a lot of info on CWC fields.I have one that is supposed to grab the doc creators initials and save it for use on a view.
I created a hidden field called takeByInitials, CWC, with formula of:
@Left(@Name([CN];@UserName); 1) + @MiddleBack(@Name([CN];@UserName); " "; 1)
This computes the initials of the creator based on the common name.
I don’t want this field to change, so users can tell who first opened this doument.
That works fine, except some of the docs have changed to one of the other users who have made revisions to the document (usually the second revision), but I can’t recreate it.
After reading a bunch, I’ve changed the code to:
@If(@IsNewDoc;
(@Left(@Name([CN];@UserName); 1) + @MiddleBack(@Name([CN];@UserName); " "; 1));
(@Left(TakenBy; 1) + @MiddleBack(TakenBy; " "; 1)))
TakenBy is a visible computed field that holds the creators common name “@Name([CN];@UserName)”.
This too seems to work, except that if I go back to a document that has the wrong initials in it, the code doesn’t change back to the creators initials.
I think I understood that a CWC field could be changed later using code within the document.
BTW, I’ve also tried to change the value by using an @SetField(takenByInitials;(@Left(TakenBy; 1) + @MiddleBack(TakenBy; " "; 1)) in another field later on in the document, to no avail.
Any other ideas, or am I missing something obvious?
Thanks in advance,
Bob