PB Formula marameter

Hello,

I did the following configuration on a “formula” column:

ifs({Type} = "User",
"TEXT 1
",
{Type} = "Messegue",
"TEXT 2
",
{Type} = "store profile",
"TEXT 3
"
)

The problem is that the rows are empty because the column’s parameter is set by default to “number” and I can’t change it…

do you have a solution for this?

I’m using on my test version of Seatable version 4.3.0

Hi,
In your formula column menu, choose format settings and then click re-detect, this should do the trick !

Bests,
Benjamin

Hi,
I have already tested that and it didn’t work… I had to retrieve a snapshot for it to work again, but if I modify the formula, it always shows me “number”…

Sincerely.

You can slightly modify your formula to enforce the string type :

"" & ifs({Type} = "User",
"TEXT 1
",
{Type} = "Messegue",
"TEXT 2
",
{Type} = "store profile",
"TEXT 3
"
)

The initial "" & make sure the result will be a string, because you concatenate your result with an empty string. In my opinion, the problem with the ifs function is that you don’t have an included else statement which induces that the result might be undefined (and then also “type-undefined”).

I don’t know if you can only have one of your three options in your {Type} column, but if it’s not the case, the result of your function might be undefined.
Eventually adding {Type} = "","" could deal with the case of an empty type, but it is still one particular case (the empty string), definitely more restrictive than an else statement (which means instead every other cases)…

Thank you very much for this solution !!! it’s work :slight_smile:

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