List transpose definition


#1

Hi, Cannot get the list.transpose to work inside a definition.
What could be the problem?


#2

Your issue is the definition inside your function, it should be a x:var[] … []

Also, I’m still on 1.3.2 so I use return = t1 instead of return t1 :slight_smile:


#3

Thank you Jonathan,

Have here a longer definition. How would I apply the same principle there?


#4

can you show me the format of the “x” input?


#5


#6

Not pretty but gets the job done:


#7

Okay to me :slight_smile: As long as I’ts code…
Thanks for helping me once again!


#8

def a(w:var[])
{
	b = w.GetParameterValueByName("Comments");
	c = ["KV6-1","KV6-2","KV6-3"];
	d = b<1> == c<2>;
	e = List.Transpose(d);
	return e;
};

EDIT: Would like to mention that this result could be obtained without a function too.
20180420-1a


#9

Wow cool!