Set value of a condition field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2013 07:17 AM
Hi,
i need help with setting a condition field (you know: the filter condition field that depends on a collection field).
I am implementing new application where I have a new ticket type and have a kind of template with a condition field (name: u_condition; type: condition: depends on: u_collection).
I am able to read the value of that filed by default g_form.getValue('u_condition').
But it is not possible to set the value of the other condition field by g_form.setValue('u_condition', '=', condition)
My script is:
function setConditionFromConditionTample() { var template = g_form.getReference('u_filter_template'); if(template !== null) { if(g_form.getValue('u_table') == template.u_collection) { alert(template.u_condition); // alert: active=true^EQ g_form.setValue('u_condition_string', template.u_condition); // nothing happen here return true; } else { alert('Selected template has to match with filter table. Select another template or contact your administrator, please.'); } } else { alert('Filter template could not be loaded. Please contact your administrator.'); } return false; }
***********
the variable
template.u_conditiondoes have the value like
active=true^EQ. But the condition field doest updated.
Any expirience with that?
Kind regards
Konstantin
Cheers,
Kostya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2023 02:54 PM
Hi, condition field consists of two fields actually. Condition and the related table field. Please, try also setting the value in the related field for the "table" or verify if the value is already set. Like in the example from Anubhav.
Cheers,
Kostya