顶级值更改时重置字段值 [英] Resetting the field values when top level value changes

查看:82
本文介绍了顶级值更改时重置字段值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个控件,它有多个(3)字段,并且它们在工作项类型中有相应的值。

I have a control which has multiple (3) fields and they have corresponding values in work item type.

我不希望所有字段都应该选择一个值。每当我在其他字段中选择值时,自动选择的其他值应自动重置。这可能吗?

I dont want all the fields should have a value selected. Whenever i select the value in other field, automatically other values which was already selected should reset. Is this possible?

谢谢,

Raj

Rajesh

推荐答案

嗨Raj,

关系是什么你的3场价值?可以< when>和< copy>规则符合你的要求吗?

What's the relationship of your 3 fields value? Could <when> and <copy> rules meet your requirement?

我举一个例子,当level1选择AAA,level2改为AAA,level3改为111。

I make an example, when level1 choose AAA, level2 change to AAA, level3 change to 111.

 < ; FIELD name =" Level1" refname = QUOT; Custom.Level" type =" String">

        < ALLOWEDVALUES expanditems =" true">

          < LISTITEM value =" AAA" />
$
          < LISTITEM value =" BBB" />
$
          < LISTITEM value =" CCC" />
$
        < / ALLOWEDVALUES>

      < / FIELD>

      < FIELD name =" Level2" refname = QUOT; Custom.Level2" type =" String">

        < WHEN field =" Custom.Level" value =" AAA">

          < COPY from =" value"值= QUOT; AAA" />
$
        < / WHEN>

        < WHEN field =" Custom.Level" value =" CCC">

          < COPY from =" value"值= QUOT; CCC" />
$
        < / WHEN>

        < WHEN field =" Custom.Level" value =" BBB">

          < COPY from =" value"值= QUOT; BBB" />
$
        < / WHEN>

        < ALLOWEDVALUES expanditems =" true">

          < LISTITEM value =" AAA" />
$
          < LISTITEM value =" BBB" />
$
          < LISTITEM value =" CCC" />
$
        < / ALLOWEDVALUES>

      < / FIELD>

      < FIELD name =" Level3" refname = QUOT; Custom.Level3" type =" String">

        < WHEN field =" Custom.Level" value =" AAA">

          < COPY from =" value"值= QUOT; 111" />
$
        < / WHEN>

        < WHEN field =" Custom.Level" value =" CCC">

          < COPY from =" value"值= QUOT; 333" />
$
        < / WHEN>

        < WHEN field =" Custom.Level" value =" BBB">

          < COPY from =" value"值= QUOT; 222" />
$
        < / WHEN>

        < ALLOWEDVALUES expanditems =" true">

          < LISTITEM value =" 111" />
$
          < LISTITEM value =" 222" />
$
          < LISTITEM value =" 333" />
$
        < / ALLOWEDVALUES>

      < / FIELD>

 <FIELD name="Level1" refname="Custom.Level" type="String">
        <ALLOWEDVALUES expanditems="true">
          <LISTITEM value="AAA" />
          <LISTITEM value="BBB" />
          <LISTITEM value="CCC" />
        </ALLOWEDVALUES>
      </FIELD>
      <FIELD name="Level2" refname="Custom.Level2" type="String">
        <WHEN field="Custom.Level" value="AAA">
          <COPY from="value" value="AAA" />
        </WHEN>
        <WHEN field="Custom.Level" value="CCC">
          <COPY from="value" value="CCC" />
        </WHEN>
        <WHEN field="Custom.Level" value="BBB">
          <COPY from="value" value="BBB" />
        </WHEN>
        <ALLOWEDVALUES expanditems="true">
          <LISTITEM value="AAA" />
          <LISTITEM value="BBB" />
          <LISTITEM value="CCC" />
        </ALLOWEDVALUES>
      </FIELD>
      <FIELD name="Level3" refname="Custom.Level3" type="String">
        <WHEN field="Custom.Level" value="AAA">
          <COPY from="value" value="111" />
        </WHEN>
        <WHEN field="Custom.Level" value="CCC">
          <COPY from="value" value="333" />
        </WHEN>
        <WHEN field="Custom.Level" value="BBB">
          <COPY from="value" value="222" />
        </WHEN>
        <ALLOWEDVALUES expanditems="true">
          <LISTITEM value="111" />
          <LISTITEM value="222" />
          <LISTITEM value="333" />
        </ALLOWEDVALUES>
      </FIELD>

最好的问候


这篇关于顶级值更改时重置字段值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆