Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Require mandatory field and conditional dropdown box

Hi,

I'm using RTC 2.0.0.2 version.

Below is my requirement.

I require to select either one of the choices, "Internal" or "External"
If chosen the type Internal then i don't want anything wrt "External"
If i have to choose External, then i have to get a list of items displayed in a dropdown box so that i can select one value for External category.

Selecting either one "Internal" or "External" should be Mandatory even.

Im fine about having any type of attribute for Internal/External to get this.

Any help on how this can be achieved?

Regards,
Pavithra

0 votes



6 answers

Permanent link
I'd also suggest waiting for 3.0.
If that is not paossible have a look in https://jazz.net/wiki/bin/view/Main/AttributeValueProviders.

Ralph

Hi,

I'm using RTC 2.0.0.2 version.

Below is my requirement.

I require to select either one of the choices, "Internal" or "External"
If chosen the type Internal then i don't want anything wrt "External"
If i have to choose External, then i have to get a list of items displayed in a dropdown box so that i can select one value for External category.

Selecting either one "Internal" or "External" should be Mandatory even.

Im fine about having any type of attribute for Internal/External to get this.

Any help on how this can be achieved?

Regards,
Pavithra

2 votes


Permanent link
create two enumerations, A and B, B will have ALL the subchoices of A and B.
create two ATTRIBUTES to hold the values selected from these enums.
when u create the B ATTRIBUTE  in the dependencies dialog, press + and select the A variable name.

in process config, workitems, attribute customization, value sets, provider = dependent enum,
provide a name of this valueset.

in the source attribute, pick the ATTRIBUTE to be the source (A) in the left column.
and select the ATTRIBUTE and values from the right (B)
I was incorrect. to get the B choice to be active in the left attribute, you MUST pick something from the right



then select the values in the right for the 'A' choice




then pick the B values.. note that you WILL have to pick something for the B choice (unassigned, or not selected)



2 votes


Permanent link
Conditional/linked enumerated field support has been added in RTC 3.0 - it is not available in 2.0. Not sure about your requirement to have the second field have no choice when the first has a specific value. You could probably work around this with an N/A entry for it.

0 votes


Permanent link
 Hi Ralph,

Now that I am using RTC 4.0.6 how can I implement the conditional statement logic? What script do I need to write for the Attribute Customization under "Conditions"? 

Any help would be greatly appreciated.

Thanks.

0 votes

Comments

do you mean If A was selected show only A subchoices, and the same if B is selected.
that is called dependent enumerations.

you have one that has A & B
and one that has all the other things.

then in the attribute customization, setup a dependent enum select A, then select the values connected to A, then select B and select the sub values connected with B.

but both enums on the display page, and make the second depend on the 1st (in the dependancy dialog box).

then to make  the 1st enum required, you use the  Type & State Precondition to insure that someone selected A or B (also have an unselected value)

same for the second enum.. (also an unselected value).

Hi Sam,

Thanks for that. I have two fields A and B and B is dependent on A.So I want to customize such that,if the user selects Yes for A then only B values should appear.If the user selects No in A,then B field should not at all appear on the form.How can I achieve this? Can you provide the steps if possible?I tried using the "Attribute Customization" and under that the Conditions,but not working.

sadly there is no support for the second requirement. you cannot hide a field on the fly.  you can have no choices available in B, but you cannot HIDE B.

Ok..that's a hitch.Can you let me know how to achieve this functionality then? If A is true then select values in B,and if A is  False,then have no choices available in B?


Permanent link
Thanks a ton for that Sam.I really appreciate it.Will try this out now.

0 votes


Permanent link
 Hi Sam,

I did try configuring the Value set and creating a dependent enumeration.But I am not able to pull in any "values" for any of the A or B attributes in the Source as well as Dependent enumeration.It says "No configuration UI available.You may want to edit the configuration on the Process Configuration Source tab." 

Refer to the second diagram from your previous answer.If you can see the all the Attribute values that it has there,I amn't getting those.Is there anything that I am missing? 

0 votes

Comments

can u screen shot that?

just to recap the steps

1. create enumeration A
2. create enumeration B
3. create attribute aA, as enum type, connected to enum A
4. create attribute aB, as enum type, connected to enum B, dependent on attribute aA

create (add) a value set, provider = dependent enumeration
at this point, the screen should look like


Hi Sam,


I got that working.Thanks for all your help.The only question I would have now is that,the dependencies are present in the "enumerations" and hence I have put in all the values in there myself.Is there any way I can use the Script based value set provider instead of dependent enumeration and have this "if-else"logic implemented? In that way,I do not have to go in there and change the values,if the values in my Enumeration are to change? 

Thanks

sadly no. you cannot do this dynamically.  note also that removing enum value is very troublesome, as some workitems data would them become invalid.. 

so, you can add, but can never take away.   the database stored enums provide 'archive' of an entry, but many other things do not work the same.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 15 '10, 4:46 a.m.

Question was seen: 9,086 times

Last updated: Jun 26 '14, 3:54 p.m.

Confirmation Cancel Confirm