HI
Is there any one who worked on validating Task form controls .
I have a taskform with different cotrols (text,dropdown..) . I want to make enable\disable controls based on some rule .
Is this can be achieved ?
Regards
Srini
Hi,
It is possible
Please give some information about your requirements
Thanks,
Elchin
HI ,
I have a task form with 2 Dropdown lists (DropDown 1, DropDown 2) and a Process variable (Var0) .
If Process variable value Var0 = 'Hello' and the Selected Value in DropDown 1 is also 'Hello'
Then i need to make DropDown2 ReadOnly mode (Disable mode).
If the values of Var0 and DropDown1 are different , then i need to Enable DropDown 2
How this can be achieved .
Thanks & Regards
All of you need is just to carefully read the manual !/4.5.6/images/emoticons/wink.gif|_mce_src=/4.5.6/images/emoticons/wink.gif|___jive_emoticon_name=wink|jivemacro=emoticon|class=jive_macro jive_emote|src=/4.5.6/images/emoticons/wink.gif!
Forms Builder User Guide > Editing Templates > Adding and modifying UI objects > Setting rules.
After reading feel free to ask questions and, please, don't forget to say what exactly steps you have done and what you couldn't achieve.
~ Konstantin
Message was edited by: Konstantin Melnik
Open Rules tab of Dropdown 2 and add 2 condition
1- select your variable 'Var0' from dropdown list, 'is equal to' 'Hello'
and
2-select 'Dropdown1 binding' from dropdown list, 'is equal to' 'Hello'
then check Read only below.
if you want to hide dropdown 2 when Var0 and dropdown are "Hello', check "Hidden'
If values Var0 and dropdown 1 are different then dropdown2 will be enable
I attach images like your requirements
Hi Elchin ,
There is one problem here ,If we are giving the values hardcoded ("Hello") for Dropdown1 and variable var0 in rules , it is working fine .
But we dont know what will the value in the Var0 and DropDown1 at runtime ,Since user selects DropDown1 dynamically and Var0 value depends on previous activity .
So how can we make rule takes the dynamic values .
Any pointers please ..
I tried to achieve this requirement with comparing the DropDown1 value with '$Var0$' in the rule . So that The Dynamic value of DropDown1 is checked with var0 value . But this also fails .
Please let me know if this is possible
One possible solution is to make some modifications in the form.
Set any rule for the second dropdown list, for example if it equal to '555' then make it readonly. Install the form template.
Go to path /System/Forms/<your_form_template_name>. Edit one of the form template form files with 'XFoms' format and 'dm_xfm_form' type. Find there the rule for dropdown2 and change the value '555' to the path of the first drop down list in XPath format (without quotes). Check in the file and try to create form and test the rule.
Before:
<xforms:bind id="bind3" xforms:minOccurs="0" xforms:nodeset="DropdownList2" xforms:readonly="boolean_from_string(if(/dataModel2x/DropdownList2 = '555', 'true', 'false'))" xforms:relevant="boolean_from_string(if(/dataModel2x/DropdownList2 = '555', 'true', 'true'))" xforms:required="boolean_from_string(if(/dataModel2x/DropdownList2 = '555', 'false', 'false'))" xforms:type="string"/></xforms:bind>
After:
<xforms:bind id="bind3" xforms:minOccurs="0" xforms:nodeset="DropdownList2" xforms:readonly="boolean_from_string(if(/dataModel2x/DropdownList2 = /dataModel2x/DropdownList1, 'true', 'false'))" xforms:relevant="boolean_from_string(if(/dataModel2x/DropdownList2 = /dataModel2x/DropdownList1, 'true', 'true'))" xforms:required="boolean_from_string(if(/dataModel2x/DropdownList2 = /dataModel2x/DropdownList1, 'false', 'false'))" xforms:type="string"/></xforms:bind>
Please note, if you change the rule for dropdown2 in the Forms Builder, you should make described modifications again.
Hi Konstantine,
Thanks a lot , it worked as expected .
But is this the correct of achieving form rules .
Is this a bug or limitation to the product.
Hard to say what is it.
But you can create a Future Request. This would very useful for anybody, I think.
As for me this is quite logical future and I wonder why EMC still not implemented it.