Get Set value parameter with group of categories

Hi everyone,
I’m trying to do something, but I’m stuck.
Here’s what I’d like to do: get the value of a shared parameter used in the “electrical circuit” category and apply it to items in the "Luminaires"category. But first I have to group the elements “Electrical circuit” and “luminaire” according to the value of the parameter “circuit”.

Here is my reasoning:
I group in element lists of the categories “electric circuit” and “luminaire” using the value of the parameter “circuit”. I get sub-lists with my electrical circuitry as the last element. Convert my sub-lists to lists. I use the last item in my list to get the value of the parameter that I apply to the other items in my list.
For the moment, I can’t convert my sub-lists to lists.

Can you help me, please? Is there a faster way to do what I want?

Capture1

Are you looking to get flat list? Or convert into list each last item of sub-list?

Hi,
Actually, I think I managed to do what I wanted.
I have changed the order of my settings to use “List.FirstItem” and “List.RestOfItems”.