Solved

Strange boolean capitalization behavior

  • 13 September 2021
  • 4 replies
  • 41 views

Badge

We have a strange thing going on with some of our boolean values. When I look up the event property in Amplitude, it shows values that are uppercase (True/False) as well as other values are lowercase (true/false). 

We have 3 clients -- iOS, Android, and Web. The iOS one is sending mostly lowercase values, while Android and Web tend to show uppercase values.

Event properties have clear cut behavior -- Android/Web is purely uppercase boolean, iOS is purely lowercase. However with User Properties, it seems cross-platform behavior will make some bleed between these rules, although the overarching trend is the same -- Android/Web is upper, iOS is lower.

I can’t quite believe this is our doing. Android and Web both use languages that are, by default, lowercase booleans. So there would be no reason for us to change the value sent to Amplitude.

 

Has anyone else ran into this issue? Anything we can do about it?

icon

Best answer by MikkoKarvonen 14 September 2021, 07:03

Have you verified that this is not related to the way the event property values are set on each platform? I.e. that they are not actual booleans, but instead strings that are set as “True” and “False” on web and Android, and “true” and “false” on iOS.

The mixing of the values in user properties sounds, as you suspected, simply a result on cross-platform activity, and each platform is actually setting the values in one way only.

View original

4 replies

Userlevel 4
Badge +2

Have you verified that this is not related to the way the event property values are set on each platform? I.e. that they are not actual booleans, but instead strings that are set as “True” and “False” on web and Android, and “true” and “false” on iOS.

The mixing of the values in user properties sounds, as you suspected, simply a result on cross-platform activity, and each platform is actually setting the values in one way only.

Userlevel 3
Badge +2

Hi @liukaichi ,

 

We have a strange thing going on with some of our boolean values. When I look up the event property in Amplitude, it shows values that are uppercase (True/False) as well as other values are lowercase (true/false).

Is this for a custom property? As Mikko mentioned, I would look to see if they are set as strings instead of booleans. 

Have you tested it in a separate environment to see what the value is before it is sent to Amplitude? I believe it is an issue of it is being sent to Amplitude like that as AMplitude won’’t transform or change data, it will ingest as is. I would test this out.

 

If you wanted to do a new project and clean the old data and import it, I can recommend using our Export API as well as our self backfill guide. Providing this as an option JIC you would like to clean out the project and start again!

Badge

Thanks for the replies. I've double checked with my developers and tested it myself. The values are boolean going in (if not, at least lowercase values). the values in code are lowercase as well, so there's no reason for us to write it as uppercase in the first place. 

Userlevel 3
Badge +2

Hi @liukaichi , can you PM me your organization and a brief overview of the problem and where you see it? I can make can ticket for this then. Thank you.

Reply