Hi, I have a Display Name problem. I tried t...

expressions
(Roman Papp) #1

Hi,

I have a Display Name problem. I tried to make a multi-language app using a table for the translated phrases. It works well in Detail view but not in Table view. In Table view the Column name is not replaced if I put an expression in Display Name. However if a simple text used, it works in Table view as well.

It is a bug or I missed something?

I tried it with Lookup (=LOOKUP([UserLang], Language, Language, TranslatedPhrase)) and with using a virtual column ([VirtualColumnContainingTranslatedPhrase]) but none of them worked.

Roman

(Aleksi Alkio) #2

Is this [UserLang] a ref field?

(Roman Papp) #3

No, but uses a deref expression.

(Roman Papp) #4

I mean the [UserLang] refers to a linked table, where the language of every user is permanently stored.

(Steven Coile) #5

The Display Name formula of a view is not attached to any row of any table, so a column value reference (e.g., [UserLang]) is meaningless (and silently ignored, which is a bug).

You’ll have to be more sophisticated in your lookup attempt, given that you don’t have a specific row to use. For instance, if the “linked table, where the language of every user is permanently stored”, is indexed by the user’s email address, you can get the user’s language preference with:

LOOKUP(USEREMAIL(), “UserInfo”, “UserEmail”, “UserLang”)

then use that in place of [UserLang] in your formula:

=LOOKUP(LOOKUP(USEREMAIL(), “UserInfo”, “UserEmail”, “UserLang”), “Language”, “Language”, “TranslatedPhrase”)

replacing UserEmail and UserInfo with appropriate names.

(Roman Papp) #6

+Steve Coile Thanks! It works in View names but still not in the column display names in Table view.

Now I solved the problem with no headings in table view.