Search the FirstSpirit Knowledge Base
Hi,
I have following use case: If a text field is not empty, I need to select a value in the input checkbox. The value of the text field is not the value that needs to be selected in the checkbox.
Is there some way to do this with normal rules? Or do I need a value service for this?
Best regards,
Nina
Hello Nina,
Should the combobox value be fixed, if the textfield is not empty? And when it is manually emptied, should the editor manually change the value of the combobox?
If so, this might be a solution:
<RULE>
<IF>
<NOT>
<PROPERTY name="EMPTY" source="myTextField"/>
</NOT>
</IF>
<WITH>
<TEXT>desired value of the combobox</TEXT>
</WITH>
<DO>
<PROPERTY name="VALUE" source="myCombobox"/>
</DO>
</RULE>
Attention: This rule is ignored if the text field is empty. As soon as it is filled, the rule is executed and changes the value of the combobox (and the editor cannot change the value afterwards). If it is emptied again, the rule is ignored and the value remains!
Best regards
Holger
Hello Nina,
Should the combobox value be fixed, if the textfield is not empty? And when it is manually emptied, should the editor manually change the value of the combobox?
If so, this might be a solution:
<RULE>
<IF>
<NOT>
<PROPERTY name="EMPTY" source="myTextField"/>
</NOT>
</IF>
<WITH>
<TEXT>desired value of the combobox</TEXT>
</WITH>
<DO>
<PROPERTY name="VALUE" source="myCombobox"/>
</DO>
</RULE>
Attention: This rule is ignored if the text field is empty. As soon as it is filled, the rule is executed and changes the value of the combobox (and the editor cannot change the value afterwards). If it is emptied again, the rule is ignored and the value remains!
Best regards
Holger
Yes, that works for me.
I needed to change it to <PROPERTY name="SELECT" source="myCheckbox"/> but that works. Thank you.