I would like to know how i can use a variable or pass a value into a where clause in a PDM_LIST tag. I know that the pdm_list tag only accepts values from server variables, so if you have some example or you have an idea for me it will be great.
I'm trying to use "$args.assignee", but before i saved the ticket this variable is empty, so i've trying to use "document.main_form.elements["SET.assignee"].value", but I have not been able to use this value into the where clause.
An example what i'm trying to do:
var assignee= document.main_form.elements["SET.assignee"].value;
<PDM_LIST PREFIX=cnt_var WHERE="id = U'assignee'" FACTORY=cnt>
alert("Enter to list");
Yonatan Sosa Sanchez
Thanks for your answer, i know that pdm_list is a pre-processor function.
One of our customer needs a validation with assignee field after this field was selected, and if this person have some kind of tickets an alert or a window popup could appear to show him some information, so for that reason i'm trying to doing directly in the form. document.main_form.elements["SET.assignee"].value has the value that i need to pass to pdm_list, also i'm trying to use <pdm_set> to change a value in the server side but i have the same problem like pdm_list.
So you understand that PDM_LIST, PDM_SET, and all other pre-processor macros are executed before the user sees the form. There is no way for any of those server side macros to see what the user will enter into a field on the screen.
If I understand correctly, after the user enters an Assignee you want to run a query of tickets already assigned to that person and then pop up a window based on some condition(s). I think you would have to develop a function that used some AJAX-like lookup and call that function as an onChange parameter on the Assignee field. Sounds like a significant effort.
If you were willing to wait until the user saved the ticket then the PDM_LIST could access the saved Assignee.