Lists from Excel - Removing rows that contain null values

I’m just getting into Dynamo, so I’m not very well-versed in it yet. Bear with me. :slight_smile:

I’m importing from Excel. I get 3 lists based on the columns in Excel. How can I remove the corresponding indexes from each list if one of the lists has a null value at that index?

I’m just working on the top part of the script for now. Once I get the lists, I’ll get some help on creating new types based on those lists. :slight_smile:

This method should work for any amount of sublists as long as each sublist has the same amount of values.

1 Like

That worked great for null values.
Is there something similar I can do if a cell in the first column contains a given word? If it does, drop the corresponding indexes in all lists?

Yeah, you would just have to change the IsNull to an or statement using IsNull and an ==. Here is an example using the codeblock:

t2 = DSCore.Object.IsNull(t1@L2<1>) ||
List.GetItemAtIndex(t1@L2<1>,0) == word?true:false;

Then you have the separate input to use as the filter word. This only checks in the first sublist but is easy to change to check all sublist.

1 Like