Custom actions - passing functions in criteria

Custom actions - passing functions in criteria

Under Custom actions of Report, I am trying to add a criteria as shown in the image. For some reason it is not working. I am not able to pass ID as argument to the function - isValid. Any work around to pass the ID or the entire record as the argument ?

Criteria (image attached)

ID    equals    thisapp.wf.isValid(ID)