Did SPLIT() suddenly become case sensitive???? ๐Ÿ˜จ๐Ÿ˜จ (((UPDATE: IT'S ALWAYS BEEN!)))

I was working on troubleshooting an answer for someone here in the community, and couldn't for the life of me figure out why the formula wasn't working.

I thought the answer would be as simple as using SPLIT() and counting the number of splits (minus 1)

  • But the numbers were always wrong
  • Then I noticed that some of the values had capitalization and others didn't; and the system WAS paying attention to capitalization.

APPSHEET HAS ALWAYS BEEN ((((NON-CASE-SENSITIVE))))

  • If this has changed, we need to be notified with AMPLE notice of this!!!!
  • If this new capitalization restriction applies system wide..... or if it's going to be.... there are a LOT of things out there telling people that capitalization doesn't matter. 

I know I've said that phrase at least 40+ times - no joke

I know I've built EVERY app on this assumption

So if things have suddenly changed... I'm betting a TON of my apps suddenly don't work anymore

___________________________________________________________________________________________________

Here's what I was working on

MultiTech_0-1661438397508.png

  • Dev_Check_Details = long text
  • Dev_Check_Name = text

So.... split the [Detail] based on the value entered in the [Name]

ad1c185e-bfe1-4f3f-a551-47687487fc2d

  • In the image above, I've underlined every use of the word - this should be the actual count returned by the system - (5)
  • I've circled the capitalized entries, and you can clearly see the system is only counting those - (3)

099a08f7-d097-4708-9359-0c49e18e998e

5 8 153
8 REPLIES 8

An internal note needs to be included INSIDE THE CODE, reminding devs that AppSheet is different from the norm

Most likely, some developer was working on the system - and completely unaware that AppSheet should NOT be case-sensitive - they got into the code, saw that this wasn't implemented and said to themselves, "WTF?!  Well, I'll just add that right in and fix that situation real quick."

  • Not realizing that not including that was intentional, since literally almost everywhere else case-sensitivity matters.

This isn't the first time that this has happened

That is new for me too! Damn

I think this is more about the behavior of SPLIT in particular rather than the expression system as a whole. I checked the implementation of SPLIT, and it looks like it's always been case sensitive. I don't see any recent changes that would have affected it.

We generally do try to make text comparisons case insensitive, and I don't believe there's any intention to change that. Cases like this are more likely due to oversight rather than intentional deviations from the norm. The challenge is case sensitive is the default outcome if you don't make a point to make it insensitive, and since each function in the expression system has its own implementation there are a lot of places where we need to remember to lowercase things before comparing. I would guess this was originally implemented with splitting on punctuation or whitespace in mind, and the case sensitivity of splitting on words or phrases was just overlooked.

Thanks for the response!


@Adam-google wrote:

it looks like it's always been case sensitive


Gotcha.  I guess I've never come across this situation for split!

  • FYI: No mention of case-sensitivity in the documentation.  I doubt this has caused much difficulty for people in the past, but you never know.

I almost had a heart attack.
I have though of leaving AppSheet just for this kind of unexpected changes, just remember when TEXT() was "fixed" to consider the user-locale. Most folks may not notice but I'm from south america and I had to run to change my TEXT() expressions to something else.

I guess there are two functions that are case-sensitive now @Steve, which was the other one? Find?

Steve
Platinum 4
Platinum 4

@SkrOYC wrote:

I guess there are two functions that are case-sensitive now @Steve, which was the other one? Find?


Correct.

Steve
Platinum 4
Platinum 4

I've asked @lizlynch to update the SPLIT() help doc.

I've updated the documentation for SPLIT() to indicate that the delimiter is case-sensitive. Sincerest apologies for this oversight in not calling it out in the docs.

Thank you for tagging me @Steve.

Liz

Top Labels in this Space