Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
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.
Hi ,
Try this ='Welcome Mr/Ms. ' &mid(osuser(),index(osuser(),'\')+1,len(osuser()) - index(osuser(),'/')+1) & if(now() <'12:00','Good Morning','Hello')
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
Hi,
Check with it
= ' Welcome Mr/Ms.' &SubField(OSUser(),'\',2) &
IF(Now() < '12:00', ' Good Morning ' , ' Hello')
Celambarasan
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)