If-Formula with inconsitent data error

I am trying an easy if-formula quite similar to the example form the seatable website:

if({Warenart.Herkunftsland}=“Deutschland”, “EU”,“DE”)

But I always get an error with inconsistent data. Happy to hear where I get it wrong and how to get it work.

Hi @OAMmer and welcome on the SeaTable forum !
While trying to reproduce your problem, I can’t create a column with a dot inside the name :thinking:
Is your column named Warenart.Herkunftsland or maybe Warenart is your table’s name and Herkunftsland your column name ? Can you give us more information about that (just a screenshot of your table’s columns should be enough for the beginning) ?

Bests,
Benjamin

This columm is coming from a linked table and this how you can insert it from the menu.

I already managed to get a correct formula with the following using linked columns.

if({Lieferort.Land}={Warenart.Herkunftsland},“Inland”, “EU”)

But not with the “=” Operator and a text value

Ok, thanks for the precision, I didn’t know that this syntax was possible !
Considering that, {Warenart.Herkunftsland} is not considered as a text (if you make a column with this simple formula, you’ll see that the result looks like a linked record).
To cast {Warenart.Herkunftsland} to string, you can simply add & "" after, which with force to string type as it concatenates {Warenart.Herkunftsland} with an empty string.

So if({Warenart.Herkunftsland} & ""="Deutschland", "EU","DE") should be fine (but are you sure it’s not if({Warenart.Herkunftsland} & ""="Deutschland","DE","EU") instead ?)

Bests,
Benjamin

The simple formula {Warenart.Herkunftsland} is returing the Herkunftsland correctly from the linked table . That is why I was of the opinion that is considered as text which I can match.

But anyway, that was the solution. Now it is working. Thanks a lot.

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