Apply one sub-list of strings to another sub list of elements

I have data from Excel, room names I want to apply to a sorted list of rooms. The list of excel names will match the number of lists of rooms sorted. I would like to apply the room Name1 to all rooms in the first list, Name 2 to all rooms in the second list and so on. The length of both lists will vary and the number of rooms will vary in each group. The first group of rooms may contain 3 elements, the second group may have 6 elements, and so on. I tried using List.map, varying the lacing on the function, and I tried flattening the list from Excel but nothing worked.

It is rather simple. you don’t have to use list.Map component.

1 Like

List.Lacing and List @ level also work.

:slight_smile:

1 Like

Thanks, I think the problem arises when my list of rooms is filtered. Is there any way I can account for empty values in the list of filtered rooms to maintain the primary list index? In other words, I am looking for room names 1 through 9, and there may be missing Rooms 3 and 6, but I am still trying to rename them all 1, 2, 4, 5, 7, 8, 9. I suspect I’m having null errors of some flavor. Do I need to create proxy rooms to fill in the 3 and 6 and then delete at the end?


Ironically I hit the same issue in another graph, where I have sub-lists of elements I want to match to an ordered list of parameter strings, but their could be empty element sub-lists when nothing is found requiring that specific parameter. But I still need to maintain the sequence. Do I use the index of the empty lists to deprecate the corresponding parameter string?

After struggling with all the various lacing, list levels, cleaning nodes, and null like nodes, I finally got a combination that did what I was after. Using the element list with empty sub-lists as an is-null Boolean mask paired with a clean-list with the preserve indices Boolean set to false.

1 Like