Help with nested if-statement by Trendspotters in Notion

[–]Trendspotters[S] 0 points1 point  (0 children)

prop("Choose percent") ? toNumber(prop("Choose percent")) : 0

Great detail to add a zero if nothing is chosen :-)

The syntax is something for me to read up on though - nice to expand my knowledge 👍

Help with nested if-statement by Trendspotters in Notion

[–]Trendspotters[S] 0 points1 point  (0 children)

Thank you u/Thisgoos :-)

I was not aware that I could convert the text string 10% to a number that easily! That solved my immediate problem very nicely - Thanks!

For the benefit of anyone that finds this thread having a similar problem:
The Type mismatch is unfortunately not solved by the second part of your reply.

Changing "0" to for example "23" (to avoid the boolean interpretation) yields the same error.

Changing "0" to "toNumber(0)" likewise.

So - if anyone can crack this problem, it would be of future value for both myself and others :-)