Empty List flatten

So this removes the need of using List.Create and List.Flatten too?

You’re a savior. :slight_smile: I’m gonna test it on my actual graph.

@Vikram_Subbaiah,

Just noticed that Empty List in any way causes the same issue in Excel – overwritten data in a single column.
The only alternative is to replace it with some text e.g. “No Value” or “N/A”.
Could you please tweak the designscript code in this way?

You’ll need to only change line 7 in the code block

def rtnLst (lst:var[]..[])
{
	return [Imperative]
	{
		ls = List.Flatten(lst,-1);
		if (List.Count(ls)<1)
			return ["N/A"];
		else
			return ls;
	}
};
2 Likes