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,174
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