Custom function to return the first character of a word

Hey.

Is there a custom function that can return the first letter of a word? Similar to LEFT(string,length). Or is there a work around?

Instead of adding an “Initial” field in a form (to limit the questions), I want to be able to automatically return the first letter of their first name, and add it to the user database as “Initial”. Just to give you some context - multiple users are able to share one database, and I’m using the initials to identify which entries are added by which user.

image below.

Screenshot 2022-06-09 at 15.12.45

(*In case of a duplicate, they can edit their initial later)

Great question! I had been thinking about this too. I’d like to be able to show just the first letter of a person’s last name when said person leaves a review or comments under a post. For instance, “John D.” instead of “John Doe”.

1 Like

Hi @Azi,

Welcome to the community :partying_face:

You can get the Text first letter using the Abracadalo Substract API! I will make a video. Give me some time!

Thank you

Amazing!! Thank you.

1 Like

@Azi here’s the video! Apologies for not having audio! Hope you can make it work!

@Sutter_j44 made a video too! Apologies for not having audio in here too! Hope you can make it work!

2 Likes

Thank you so much Dilon! All sorted for me. @Sutter_j44 all good for you?

1 Like

I haven’t tried it yet, but @dilon_perera is pretty reliable. I’m going to save this thread for reference later. Glad to know it’s possible and you had success with it.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

Hi @Azi and @Sutter_j44 ,

Thought to share this new solution!

Here’s the script for @Azi :

var first_name = "azi";
var first_name = first_name.charAt(0).toUpperCase();
return first_name;

( fill azi from magic text )

Here’s the script for @Sutter_j44 :

var first_name = "sutter";
var first_name_in_capital = first_name.charAt(0).toUpperCase() + first_name.slice(1);
var last_name = "j44";
var last_name_in_capital = last_name.charAt(0).toUpperCase()
var Name = first_name_in_capital + '\xa0' + last_name_in_capital + ".";
return Name;

(fill sutter and j44 from magic text )

Thank you

1 Like