Need help with a formula to display a single entry

Hello to you expert Coda :slight_smile: ,

I am working on a simple translation model based on translated day and month tables. I wanted to add, using the ISO CODE of the “Machine translation” table, the day, month according to the tables that are translated in the supported languages.

To do this, I started by creating my table and using English and French to see if everything worked correctly.

Then, I started to improve and structure my pages :), so I wanted to create a formula that would allow me to display its information according to this famous ISO code (column “User ISO code”). Yes, I like to take the headache :), but I did not want to use a LookUp() directly.

So I created this formula that makes the relation with the right translated table, but I can’t manage to display only one day and not the whole week hehe.

Here, I hope I’ve been precise enough and I’ll add an embed directly to see all the formulas, etc :).

IF(NOT(ISBLANK(thisRow.[Code Iso utilisateur])),
thisRow.[Code Iso utilisateur],
"fr", [Traduction des jours].fr,
"es", [Traduction des jours].es,
"en", [Traduction des jours].en,
"de", [Traduction des jours].de,
"zh", [Traduction des jours].zh,
"ru", [Traduction des jours].ru,
"pt", [Traduction des jours].pt,
"it", [Traduction des jours].it,
"ja", [Traduction des jours].ja,
"ar", [Traduction des jours].ar,
"ko", [Traduction des jours].ko,
"nl", [Traduction des jours].nl,
"sv", [Traduction des jours].sv,
"pl", [Traduction des jours].pl,
"tr", [Traduction des jours].tr,
"el", [Traduction des jours].el,
"hi", [Traduction des jours].hi,
"Invalid Input"
"Invalid Input")

For each entry in your switch list, you need to first filter the [Traduction des jours] table to just the day you’re interested in.

[Traduction des jours].Filter( CurrentValue.en.Lower() = thisRow.English.Lower() )

This is very verbose to do again and again for each item in the list, so I would recommend you do withName()

... if not isblank etc still goes here and then ...
    [Traduction des jours].Filter( CurrentValue.en.Lower() = thisRow.English.Lower() ),
        thisRow.[Code iso utilisateur],

Let me know if that helps / if I’m interpreting your question correctly.

1 Like

Hello @Nick_HE

Thanks for your help already :), if I understand correctly it looks a bit like what I did in the “French” column of the “Automatic translation” table?

Link with the formulas :



This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.