Based on the state selection, which is also a plugin, I need to display the cities associated with it.
For example, if the customer selects the Ohio option I need to invoke my Ohio cities reports and display the options for this report in a select field.
I'm not sure how to call this report and display this data correctly.
I created 27 new objects of each, one for each Brazilian state/cities, as shown below:
Each report date shows the cities of a specific state, I figured that using the ca_reportQuery option I could invoke all 27 plugins from each city and display them conditionally according to the state's choice.
This state option for example is already used to show and hide some custom fields in some forms as well.
showLabel: function () {
var state= ca_fdGetSelectedOptionValues(ca_fd.formId, 'ca_sdm_attr_z_str_state');
if (state == 'Distrito Federal') {
ca_fdHideField(ca_fd.formId, 'predio_descentralizadas');
ca_fdHideField(ca_fd.formId, 'sala_descent');
ca_fdShowField(ca_fd.formId, 'predio');
ca_fdShowField(ca_fd.formId, 'sala');
}
if (state != 'Distrito Federal') {
ca_fdHideField(ca_fd.formId, 'predio');
ca_fdHideField(ca_fd.formId, 'sala');
ca_fdShowField(ca_fd.formId, 'predio_descentralizadas');
ca_fdShowField(ca_fd.formId, 'sala_descent');
}
}
I would just like to use these options to condition the display of new fields and invoke the ca_reportQuery of each of these fields.