A calculation--either in a field or a script step:
Left ( LoginText ; Position ( LogInText ; "@" ; 1 ; 1; ) - 1 )
will return all text to the left of the @ symbol.
Dear Phil Sir,
Here in calculation, How I need to set the "LoginText" field..?
Employee Name = Left ( EmployeeName ; Position ( EmployeeName ; "@" ; 1 ; 1 ) - 1 )
is the above example is correct (or) I should want to change, because the above one is not working :/
Suggest me just briefly sir..
There is more than one way to do what you want and you provide almost no detail that would suggest on option over another.
You might define a calculation field named LogInName with this expression:
Left ( EmployeeName ; Position ( EmployeeName ; "@" ; 1 ; 1 ) - 1 )
This keeps the complete text as entered in EmployeeName, and just the text to the left of @ in LogInname.
Or you can set up EmployeeName as a text field with this auto-enter calculation:
Left ( Self ; Position ( Self ; "@" ; 1 ; 1 ) - 1 )
Be sure to clear the "do not replace existing value" check box if you use this option
And a script could use set field with this expression to put the text to the left of @ into a field....
Where did "get account name" come from? that's new. And your use of Trim (Middle ( "@firmdomain.com"... makes no sense to me at all. It does not match your original request as I understood it. If I use what you typed in, this part of your calculation returns no text at all as @firmdomain.com is not 16 characters in length so it refers to text that does not exist.
What I recommended works like this:
You enter text such as:
the calculation returns:
I think that you need to start over and describe in much more detail exactly what it is that you want to see take place on your FileMaker Layout.
Ok Sir. Thanks for the suggestion..