You can set the value of a field based on the value of another field. 


Example: Set the Convert Document to PDF check box based on certain types of Document.


Example:


<xf:select1 id="DOCCON_MAIN_DOC_ID_TYPE-control" bind="DOCCON_MAIN_DOC_ID_TYPE-bind"

                                            appearance="dropdown">

                                    <xf:label ref="$form-resources/DOCCON_MAIN_DOC_ID_TYPE/label"/>

                                    <xf:hint ref="$form-resources/DOCCON_MAIN_DOC_ID_TYPE/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                    <xf:itemset ref="$form-resources/DOCCON_MAIN_DOC_ID_TYPE/item">

                                        <xf:label ref="label"/>

                                        <xf:value ref="value"/>

                                    </xf:itemset>

                                    <xf:action ev:event="xforms-value-changed">

                                        <xxf:script>dispatchRefresh();</xxf:script>

                                    </xf:action>

                                    <xf:action ev:event="xforms-value-changed"

                                               if="//DOCCON_MAIN_DOC_ID_TYPE = '3' or //DOCCON_MAIN_DOC_ID_TYPE = '8' or //DOCCON_MAIN_DOC_ID_TYPE = '4' or //DOCCON_MAIN_DOC_ID_TYPE = '5' or //DOCCON_MAIN_DOC_ID_TYPE = '2' or //DOCCON_MAIN_DOC_ID_TYPE = '9' or //DOCCON_MAIN_DOC_ID_TYPE= '10'">

                                        <xf:setvalue ref="//DOCCON_MAIN_DOC_BODY_CONVERT_TO_PDF" value="true()"/>

                                        

                                    </xf:action>

                                    <xf:action ev:event="xforms-value-changed">

                                        <xf:setvalue ref="/form//DOCCON_MAIN_DOC_ID_REVIEW_DATE" value="string('')"/>

                                    </xf:action>

                                </xf:select1>