Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Greeting screen should have only user name instead of domain-username!

Hi, 

I just want to show the name not entire log-in crediantial like domain name then user name. I want to do  this  is designing screen, is  this possible?

= ' Welcome Mr/Ms.' OSuser()  &

IF(Now() < '12:00',  '  Good Morning ' , ' Hello')

and result is giving  the domain/username, which I dont want.

Best Regards,

Shubham

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    You can try this.

    ='Welcome Mr/Ms. ' &mid(osuser(),index(osuser(),'/')+1,len(osuser()) - index(osuser(),'/')+1) & if(now() <'12:00','Good Morning','Hello');

    You can also use this

     ='Welcome Mr/Ms. ' &subfield(OSUser(),'/',2) & if(now() <'12:00','Good Morning','Hello');  

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Hi  Kaushik,

Thanks for your reply, however it is not giving the result, it's saying garbage vaule  after expression, I think there is  some problem with coding, could you please test that once and let me know.

Thanking you in advance.

Best Regards,

Shubham

brindlogcool
Creator III
Creator III

Hi,

Just remove the semicolon at the end of code. You will not get the garbage value . But still i am getting the domain/username.

brindlogcool
Creator III
Creator III

Hi ,

Try this   ='Welcome Mr/Ms. ' &mid(osuser(),index(osuser(),'\')+1,len(osuser()) - index(osuser(),'/')+1) & if(now() <'12:00','Good Morning','Hello')

Miguel_Angel_Baeyens

Hi,

The OSUser() function always returns the current user in the form DOMAIN\USERNAME. You can use of course what Kaushik and brindlogcool have suggested, but it will always be part of that USERNAME. So the result will always be as cryptic (or clear) as the value of USERNAME is.

Another way to work that around is to add, either manually or reading directly from the AD if your have a user allowed to do so, a new field fullName or displayName to your data model with the complete Name of your users, so when the user logs in there is always one value that shows the First Name and Last Name. You can use Match() and Concat() to get that, or Only() with some set analysis, depending on how you load your data.

Hope that helps.

Miguel

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with it

= ' Welcome Mr/Ms.' &SubField(OSUser(),'\',2)  &

IF(Now() < '12:00',  '  Good Morning ' , ' Hello')

Celambarasan

jduenyas
Specialist
Specialist

Check this one out:

='Welcome Mr/Ms. ' &

mid(osuser(),index(osuser(),'\')+1,len(osuser()) - index(osuser(),'\')+1)  & chr(10) &
if(Time(now())<= '12:00 AM','Good Morning','Helo')

Replace the "/" of previous reply with "\" (back slash)