If conditions

Hello community,

I wish through the java snippet node to achieve “if condition then…” it works but not totally as I would like.
I want that if in this country there are more than 200 players then the column is equal to its value (ex: scotland =>220 players then in my column this amount should be displayed otherwise if <200 then “NO”

Thanks in advance

It looks like you want to cast your Sums to String. For this you need the String.valueOf() method.
Something else that I can see not working is that you have two different output columns (SumScotland and scotlandd), but either one or the other gets assigned a value.
I’ll take a guess und suggest this solution, if that’s not what you need, please share with us the input table of the Java Snippet and the expected output.

if (c_SumScotland > 200) {
	out_scotlandd = String.valueOf(c_SumScotland);
else {
	out_scotlandd = "NO";

@Thyme A very big thank you.

Hoping one day to help the community as well.

Have a nice evening

1 Like

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