Cannot compare List with Text in

Hi. I have the next expression:

SELECT(“Traduction[” & LOOKUP(USEREMAIL(), “Team”, “eMail”, “Language”) & “]”, Traduction[Text] = “Confirm”)

The expression “Traduction[” & LOOKUP(USEREMAIL(), “Team”, “eMail”, “Language”) & “]” return Traduction[CA] if the language of the user is Catalan, Traduction[ES] if the language of the user is Castilian or Traduction[EN] if the language of the user is English and I have this columns in my table.

The field Traduction[Text] is key and contain AppSheet’s expressions: Confirm, Yes, Delete… My objective is use this expression on Localize functions to have an easy traductor.

The interface returns “Cannot compare List with Text in (Traduccions[Literal] = “Confirm”)”.

What is the error? Can you help me?

THANKS!

0 4 1,170
4 REPLIES 4

Steve
Platinum 4
Platinum 4

You’re attempting to use SELECT() improperly.

Thank you Esteve. Yes. It’s true.

My question is misspelled. How can I reference a column dynamically instead of explicitly?

If I write

  • SELECT (Translations [CA], ([Literal] = “Confirm”))
    or
  • LOOKUP (“Confirm”; “Translations”; “Literal”; “CA”)
    works properly.

But I want to assign the value “CA” of a dynamic mode. I want to be able to express “CA” as a parameter, like now

  • USERSETTINGS (Language)
    or
  • LOOKUP (USEREMAIL (), “Team”, “eMail”, “Language”)

Where can I find documentation to do this?

Thank you for your time.

You cannot.

Thanks.

It’s a pity. In this case, I can only work with the SWITCH() function, but it makes the code very long and difficult to maintain.

It’s been a pleasure.

Top Labels in this Space