How to edit outside variables in mapping function

Hi again,
I suspect that this here and your other issue have the same solution.
Issue