First letter in caps for predictive model initial value

Hello!

I recently managed to implement my first predictive model in appsheet. I set it as initial value when adding a new item. The problem is that it sets the inital value (type enum) in small letters even though the enum has a caps first letter.

Is there a workaraound for that? Thx for the help!

Emilio

Any Ideas how to fix the issue?

Chiming in @tony

Hi @emilioudi, thanks for bringing this bug to our attention. We’ll work on fixing it.

In the mean time, here’s a workaround (also known as a “hack”) that should unblock you for now:

IFS(
  PREDICT("Your Model") = "tony", "Tony",
  PREDICT("Your Model") = "emilioudi", "Emilioudi"
...
)
4 Likes

Hi @tony your “hack” worked :slight_smile: thank you for that!
although for some columns with the type enum i have more than 30 different values which makes for a long formula :sweat_smile:

Emilio

Perhaps easier:

SWITCH(
  PREDICT("Your Model"),
  "tony", "Tony",
  "emilioudi", "Emilioudi",
  ...
)
2 Likes

Perhaps even easier!

ANY(
  INTERSECT(
    {"Tony", "Emilioudi", ...},
    LIST(PREDICT("Your Model"))
  )
)
4 Likes

thank you @Steve Steve this is easier, especially for the long columns with a lot of values :+1:

1 Like

Does appsheet not have a function for capitalizing and uncapping letters?


1 Like

TITLECASE()?
For fun technically:
UPPER(INITIALS(PREDICT(“Your Model”))&Right(PREDICT(“Your Model”), LEN(PREDICT(“Your Model”)-1) should get a title case so long as everything is 1 word right?

2 Likes

There is no TITLECASE() equivalent function. :frowning:

Your expression would work fine.

1 Like
1 Like