Troubles with List.GroupByKey in a definition

Hey Everybody!

I’m having some trouble with the function “List.GroupByKey” in definitions, it only return nulls for each list.

When I’m trying the same thing in a code block it works fine.

Anyone who knows what I’m doing wrong?

Hi @jgu,

Maybe you have to transform the value from the Element.ElementType into a string before you can use it as a key.

Kind regards,
Mark

@jgu You don’t need a function, actually.
With nodes, you could do this …


The same can be converted to Design Script in a code block (without a function)

However, your function has a few issues.
The one below provides some output, not the desired one
But should help you identify the issues in yours.

2 Likes

THANK YOU SO MUCH!!! - or in danish: TAAAAAAK!!!

That was exactly what I needed, everything is working as I wanted it

image

1 Like