Filter Sublists by conditions

Hi everyone,

Im scripting to create sheets from an excel template, to Revit with some conditions; and also write filtered parameters to sheets.

The condition is this:
If excel cell of the I column is empty don’t extract all the information that excel contains. So don’t create a sheets if I is empty.
Example: https://imgur.com/a/Hhv6j

Now im with this: (Upper is correct I think, down side just for tests)

I have the I column values filtered but I need to extrapolate to all the list.

Some clues and help?

Thanks in advice

1 Like

Could you elaborate a little on this point?

1 Like

I THINK THIS COULD HELP YOU AS I UNDERSTAND:

1 Like

Some explanation would be useful :slightly_smiling_face:

as i understand he has an excel sheet with specific values in each column, but if any value is empty he want to remove all the row

Sorry, I hadn’t many time those days

Yes,is that but not for a any value is empty in any column, only empty values in the column “i”.

So I’m extracting all the information from excel and each column is in a indexed list.

USING THE IMAGE
The values from the index number 3 have empty values, I want to remove all the empty values (3.2) on this sublist, and then, remove also the same subindex values in the other index list (X.2).

Using your example above, you’re saying if any value of index 2 in any sublist is null, remove all items at index 2 for all sublists?

near. Step by step, maybe is more easy, and sorry for my bad explanation

  1. I want to detect all the empty values in list number 8.
  2. Those empty index will be deleted.
  3. I want to delete all those index for all the lists.

im very near.

Why do you need to remove some nulls but not all? You can usually get by with nulls in your list just fine.

If you’re trying to get rid of null values in just the 8th list you could do something like this.


I’m still not sure if it’s necessary to remove these nulls though. You’ll have to explain your reasoning so we can get a better idea of what the issue is. There might be a better workflow.

this is the script I want to do.

Objectives: I have an excel template to create sheets for a project.

Now: By the moment we use the schedules to replace the excel and make a sheet scope.

Idea: Use the template to create the sheets with dynamo. I have this sample. I want to read all the rows from my excel that have content in the M column. if any cell of the M column is empty, the row is not necessary because this are a titles not sheets.

@xavierderos this is similar to what @Nick_Boyts showed above, but uses a custom node from the DanEDU Dynamo package to find the indices of nulls in the sublists and eliminates the need for the Object.IsNull node

1 Like

YES! it works

Thanks for all!!