# Presenting user name initials in the profile container (Xano Auth)

**URL:** <https://community.weweb.io/t/presenting-user-name-initials-in-the-profile-container-xano-auth/2931>\
**Category:** How do I?\
**Created:** [June 4, 2023, 5:39pm UTC](https://community.weweb.io/t/presenting-user-name-initials-in-the-profile-container-xano-auth/2931 "2023-06-04T17:39:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ran](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@Ran](https://community.weweb.io/u/Ran)\
**Post date:** [June 4, 2023, 5:39pm UTC](https://community.weweb.io/t/presenting-user-name-initials-in-the-profile-container-xano-auth/2931/1 "2023-06-04T17:39:40Z")

</div>

Hi all,  
Is there a way to use the binding function to manipulate a text field to present only the initials of a user that is being “stored” at a username variable in Xano auth connected to my Weweb app?  
If not, what is the best way to do that?

Thanks,  
Ran

---

<div class="post-metadata">

**Author:** ![raydeck](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raydeck/32/384_2.png) [@raydeck](https://community.weweb.io/u/raydeck)\
**Post date:** [June 4, 2023, 9:06pm UTC](https://community.weweb.io/t/presenting-user-name-initials-in-the-profile-container-xano-auth/2931/2 "2023-06-04T21:06:50Z")

</div>

I would:

1. switch the binding from “formula” to “javascript”
2. find the username variable under “var”,
3. click it,
4. and then update the text as follows:

```auto
return [username variable clicked under "var"].split(" ").map(word=>word[0].toUpperCase()).join("");

```

If the username variable is “Ray Deck”, the above will return “RD”

---

<div class="post-metadata">

**Author:** ![Ran](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@Ran](https://community.weweb.io/u/Ran)\
**Post date:** [June 5, 2023, 12:40pm UTC](https://community.weweb.io/t/presenting-user-name-initials-in-the-profile-container-xano-auth/2931/3 "2023-06-05T12:40:24Z")

</div>

> [@raydeck](#):
>
> `return [username variable clicked under "var"].split(" ").map(word=>word[0].toUpperCase()).join("");`

Great, thank you!  
If this is the username under Var -  
variables[/\* User name for initials \*/‘fd8c3074-4020-4db5-904f-8f495449d7ac’]

What should the final script look like?  
Apologies - I’m making my first steps in working with code…  
🤦‍♂️

---

<div class="post-metadata">

**Author:** ![Quentin](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/quentin/32/6_2.png) [@Quentin](https://community.weweb.io/u/Quentin)\
**Post date:** [June 5, 2023, 3:03pm UTC](https://community.weweb.io/t/presenting-user-name-initials-in-the-profile-container-xano-auth/2931/4 "2023-06-05T15:03:53Z")

</div>

@raydeck’s answer work, but you could also do it fully no-code using formulas:

 ![CleanShot 2023-06-05 at 17.02.27](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/732674f9ae97dd9d48f1d1ab9a1b9964a17de28b.png)

What you’ll have to do is replace the variable (be it with @raydeck’s solution or mine) by the one you want to use as a starting point. In my example, it’s the currenlty logged-in username coming from the authentication plugin.

---

<div class="post-metadata">

**Author:** ![Ran](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@Ran](https://community.weweb.io/u/Ran)\
**Post date:** [June 5, 2023, 4:30pm UTC](https://community.weweb.io/t/presenting-user-name-initials-in-the-profile-container-xano-auth/2931/6 "2023-06-05T16:30:22Z")

</div>

Thank you so much!  
It worked 😀
