Custom action on view

Custom action on view

I want give the option to users to edit a field (radion button, with two choice : "Approved", "Not approved") by a custom action on a view.

I want to change the Status "Not approved" by "Approved".

I wrote this function :

void status.Approval(string TheStatus)
{
    if (input.TheStatus  ==  "Not Approved")
    {
        input.TheStatus = "Approved";
    }
    info input.TheStatus;
}



I added this function to my view :

 custom actions
    (
        "Approve"
        (
            function = status.Approval(Status)
            show action in view header = true
            show action for each record = true
            success message = "Function executed successfully"
        )
    )

When I try to click on "Approve", nothing change. Only the log message appears, with at least the right value.
 What's wrong with my script?

Thank you!