# Custom name for current value as a function parameter

**URL:** <https://connect.superhuman.com/t/custom-name-for-current-value-as-a-function-parameter/45003>\
**Category:** Product Feedback\
**Created:** [December 8, 2023, 12:16pm UTC](https://connect.superhuman.com/t/custom-name-for-current-value-as-a-function-parameter/45003 "2023-12-08T12:16:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikola\_Lajic](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/nikola_lajic/32/21708_2.png) [@Nikola\_Lajic](https://connect.superhuman.com/u/Nikola_Lajic)\
**Post date:** [December 8, 2023, 12:16pm UTC](https://connect.superhuman.com/t/custom-name-for-current-value-as-a-function-parameter/45003/1 "2023-12-08T12:16:40Z")

</div>

`CurrentValue` in loops such as Filter and FormulaMap/ForEach is a pain to use because we have to use `WithName` to be able to access the current value of a parent loop:

```auto
Table A.Filter(
     CurrentValue.WithName(
           ParentCurrentValue, 
           Table B.Filter(
                 CurrentValue.Prop=ParentCurrentValue.Prop
           )
     )
)

```

While the above example doesn’t make much sense and is just for illustration, there are many times I find myself trying to access a parent current value.

My suggestion is to add a new named or optional argument (so existing formulas are not broken everywhere) which can be used to set a custom name for the current value, something like: `ForEach(List, CurrentValueName, Formula)`, and so the above example would become:

```auto
Table A.Filter(
    CurrentTableARow, 
    Table B.Filter(
         CurrentValue.Prop=CurrentTableARow.Prop
    )
)

```

With one level of nesting the difference is not very visible, but Coda formulas are already very verbose and any nesting that can be avoided is a “quality of life” improvement.
