Why parameter of my custom procedure is not getting appended to function

\function temp-edit-box(target-field)
[[$:/temp/edit-box/]addsuffix{!!title}addsuffix[/]addsuffix<target-field>]
\end

\function temp-edit-box-value(target-field)
[<temp-edit-box>get[text]]
\end

\function target-field-value(target-field)
[<currentTiddler>get<target-field>]
\end

\procedure edit-box-actions(target-field)
<$let 
target-fieldvalue={{{ [<currentTiddler>get<target-field>] }}}
>
<$action-setfield $tiddler=<<currentTiddler>> $field=<<target-field>> $value=<<target-fieldvalue>>/>
<$action-deletetiddler $tiddler=<<temp-edit-box>>/>
</$let>
\end

\procedure view-box-actions(target-field)
<$let 
target-fieldvalue={{{ [<currentTiddler>get<target-field>] }}}
>
<$action-setfield $tiddler=<<temp-edit-box>> $field="text" $value=<<taregt-fieldvalue>>/>
</$let>
\end

\procedure view-box(target-field) 
<$let 
target-fieldvalue={{{ [<currentTiddler>get<target-field>] }}}
>
<$button actions=<<view-box-actions>> class="tc-btn-invisible"> <<target-fieldvalue>> &nbsp;{{$:/core/images/edit-button}}
</$button> 
<br> 
target field is <<target-field>>
<br>
temporary tiddler is <<temp-edit-box>>
</$let>
\end

\procedure edit-field(target-field) 
<$list filter="[<temp-edit-box>is[tiddler]]" emptyMessage=<<view-box>> variable=none>
<$keyboard key="Enter" actions=<<edit-box-actions>> >
<$edit-text field=<<target-field>> placeholder="Add new entry here"  default="" tag="input"/>
</$keyboard>
</$list>
\end

Here is a code I am experimenting with to create a view-cum-edit box for tiddler fields in different view templates. This is a modified version of the code in this discussion - How to prevent edit text widget used in the subtitle to not lose focus while typing
My intention is to use this procedure to display and edit the field values easily from the view-template itself by calling this procedure.
Above given is an initial partly working code. There can be other mistakes in this code.
But my question for this post is regarding the code given below

\function temp-edit-box(target-field)
[[$:/temp/edit-box/]addsuffix{!!title}addsuffix[/]addsuffix<target-field>]
\end

Why temporary tiddler created doesn’t have parameter called target-field added as suffix. Why this is happening. Because of this issue, the procedure call is not unique for each fields. Can someone help.
Here is a demo wiki - https://edit-field.tiddlyhost.com/ .Use the Enter key to return to view mode from edit mode

Solved by removing the parameter target-field from the function

Yes this occurs because when you name a parameter a variable is created to reference that parameter. The variable is a new one that is reusing the previous name. Once the current function/procedure is exited the variablename will again refer to the value previously set.

  • This shows how the same variable name can be reused multiple times but in so doing you no longer have access to the earlier definition until you exit the TiddlyWiki script that defined its current version.
  • The moist common example is the currentTiddler Variable, first set when displaying each tiddler in the story river, by default when we use the list widget we use currentTiddler for each of the titles resulting from the list widgets filter.
    • Unless you use the variable attribute to use an alternate variable name.
    • If you no longer have the original currentTiddler Variable and need to reference it, there is another available the storyTiddler (unless you redefined it)