Defining Macro Error

Dear All

Can you help me with this error when i tried to define a macro

=> (decimal)x.unit_code == @optioncode
&& (decimal)x.code == _parent.@rowcode)

unit_filter_final is a look up file I have defined and I want to filter the unit according to the item selected

it is saying name parent does not exist in the current context.

User-defined identifiers may not start with an underscore.
See: Variable names

Then how can I call a roster in a macro. For example my question where I want to insert the filter is inside a roster, The question is the unit for the different codes and the question for the codes is outside the filter.

I have defined a lookup file as attached. Now My question on unit for each item is in a nested roster. I firrst ask the items consumed after that for each item, the source type is asked and for each source type I ask the unit and price. Now I want to filter the unit according to the item selected. want to define a macro so that I can call the macro for all items unit filter. How I can i define that.