@NameLookup question

On a form, the ‘User’ field is an editable Names field. In the computed text field, ‘UserFullName’, I would like to retreive the User’s name without ‘CN=’, etc. To test the abbreivation of the User’s name, I added a computed field with the formula, @Name([ABBREVIATE]; @UserName). When I opened the form, I saw that it worked correctly. But when I add this into the @NameLookup formula, it did not abbreivate the ‘User’ field. Does abbreviating a name work in @NameLookup? Below is the full code for the ‘UserFullName’ field. Thanks for your help in advance.

FIELD User := user;

userName := @Name([Abbreviate]; user);

nameLookup := @Subset(@NameLookup([Exhaustive]; userName; “FullName”); 1);

@If(@IsError(nameLookup); “”; nameLookup)

Subject: @NameLookup question

The FullName field actually has values like this:

“CN=Charles Robinson/O=COMPANY”

“Charles Robinson”

@Subset(…;1) is going to give you the first one, which is hierarchical. If you want to shorten it, you’ll have to apply @Name to that or use @Subset(…;2). You’re pretty much guaranteed the first entry for any registered user is going to be the hierarchical name, but there are no guarantees about any other entries. I’d opt for using something along the lines of:

nameLookup := @Name([Abbreviate];@Subset(@NameLookup([Exhaustive]; userName; “FullName”); 1));

Subject: RE: @NameLookup question

Charles, thanks for your help. Your suggestion worked perfectly. Now I understand what I was doing wrong. Thanks again!