Brian Dunning's FileMaker Custom Functions

BaseAccountName ( AcctName )

Strips the domain name from the user account name when it is in UPN or domain\username format.

  Be the first to rate this function Log in to vote

Matt C   Matt C - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
BaseAccountName(Get(AccountName))
or
BaseAccountName("username@domain.net")
  Sample output:
username

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

When using External Authentication with a Microsoft Active Directory domain, depending on how the user logs in, Get(AccountName) may return the username in a number of different formats.

For example, Get(AccountName) may return:
username
domain\username
username@domain.net

This function strips out the domain name and returns only the base username.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: