How to filter by first name last/end character?

What im trying to do here is in my country’s language if we have the sentence “How would you say Leos performance is?” the sentence works fine “How would you say NAMEs performance is?” but what happens if the user full name split by ( ):first item ends with an S then it is double S? and in my country i cant write Leo’s for example. Then the name Andreas will be Andreass?

My idea is to set a condition if name ends with S replace the current user fullname splitby ( ):first items with current user fullname splitby ( ):first item?

1 Like

Bumping this, I have still not found a solution. @adamhholmes do you know if this is possible?

user full name:split by ( ):first item:truncated from end to 1 is "s" :format as text then put what you want to appear for “yes” when it does end with “s” and put what you want for “no” when it doesn’t end with “s” :blush:

1 Like

Hi Tyler, thanks for taking your time to help me out, i really appreciate it!
Im having some issue, cant seem to do truncated after first item?

Screenshot 2024-04-13 at 11.23.36

any suggestions?

1 Like

Very odd, seems to work for me :thinking:
image

Also what I suggested would go directly as the text data source, it would show the text you want based off of if its a yes or no without needing to be in a condition

Now somehow it worked! What does the Yes and No do? I have never used that feature!

Screenshot 2024-04-13 at 11.32.36

Is it IF YES: This text 123

IF NO: This text 321
?

Yes is the text that would show if the condition is true, so if it’s ending in “s” maybe you just want Current page's user's full_name:split by ( ):first item

And for No do
Current page's user's full_name:split by ( ):first item followed by a static “s” ?

And this will give you an error when you click out of it this whole expression just has to be copy/pasted as the datasource for the text, not in conditional section

1 Like

Ahaa okey! But i seem to have to add something else after text?
Screenshot 2024-04-13 at 11.38.21

If that’s in the conditional section still that just needs to be pasted as the regular datasource in the Appearance tab and delete the conditional. I prob over complicated it cause normal people just use conditionals :joy: but I don’t like to see the initial text flash while the condition is being checked

1 Like

Now it works! Thank you so much Tyler, lifesaver today :smile: :tada: And i agree, looks better this way instead of flashing! Very neat trick that i will start using all over my app :raised_hands:

1 Like

Good to hear :blush:

1 Like

Hey Tyler, ran in to another issue, since the problem is for both X and S how to i include both?

What i did now was to add a or after “x” and added the exact same line of text abd replaced x with s and then :formatted as text

Is this the best way?

Yep that works :grin:

1 Like

Thanks again Tyler! There is not a better/more optimal way?

Nope that is good, in Bubble you just put OR between expressions like you did to account for both scenarios :+1:

Awesome, thanks! :smile: :clap:

This topic was automatically closed after 70 days. New replies are no longer allowed.