Hi PHPR community forum,
I am not sure what is wrong. I kept reading the Field events and the methods and applied what I read but it still doesn't work. Here's my scenario.
I have an Add form. In this form are:
Form number: C20001 (read only)
Date: 06/05/2020 (calendar control)
System: [C, P] (dropdown list)
Form number format: C20001
where C = system; 20 = 2-digit year; 001 = counter
If a user choose a system, the form number will change: if C chosen = C20001. If P chose = P20001.
If a user change the date to another year, form number will change: 06/05/2021 = C21001, 06/05/2019 = C19001.
I have code for the field event for both system and date field.
System field event->change->client before which is working.
params["system_id"] = this.getValue();
But, if I reference the system on the date field event->change->client before it is not getting a value:
var ctrl_system_id = Runner.getControl(pageid, 'system_id');
params["system_id"] = ctrl_system_id.getValue();
System and date field have default value set so it should get a value.
What seems to be wrong?