Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

To make a field Mandatory using javascript

 Hi,

I'm trying to apply calculated value attribute customization. I would like to make a field mandatory based on the value selection of another field.  Can someone tell me on what function to be used to make a field mandatory using javascript ?

0 votes


Accepted answer

Permanent link
It seems that what you are looking for is described in this article https://jazz.net/library/article/537
Have a look at the section "Dynamic required attributes".
It should be a good advice to write your own attribute condition.

Hope that helps
Ralph Schoon selected this answer as the correct answer

3 votes

Comments

It works great for me !!! The advantage of using this method is that we can get a red * mark based on the value that we are selecting in base enumeration field (Condition field)


3 other answers

Permanent link
 Hi All,

            I followed the link and enabled the dynamic attribute based on another enumeration value. But the * mark doesnt appear to indicate the mandatory attribute. I am using RTC V3.0.1.1 .

I noticed that this issue is fixed - but is it in a later version of 3.0.1?

Thanks.

0 votes


Permanent link
Hi Valli,

It should work when the condition returns true...

To ensure that, please add console log in the script and check the value of base enumeration and literal.

Or some times, it will take effect after RTC Client restart. post your script for further analysis

Regards
Muthu

0 votes


Permanent link

Hi Muthu,

                 Script does work - it prevents the workitem save - saying the attribute is mandatory. The problem is that there is no red * indicating that the attribute is mandatory.Just wondering if its a known issue for 3.0.1.1?

RTC Version - 3.0.1.1.

0 votes

Comments

Hi Valli, Somebody from Jazz team should confirm this. Its working for me in both 3.0.1.2 and 4.0.0.1

Noticed that

 Wokitem 133631 is related to this - but not sure if its fixed for
3.0.1.1. Can you refer to post https://jazz.net/forum/questions/104627/dynamically-mandatory-attributes-problem-with-indication-rtc-v3011 for the script? Please advise on the script

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: Aug 05 '12, 9:37 a.m.

Question was seen: 7,612 times

Last updated: Mar 05 '13, 7:56 a.m.

Confirmation Cancel Confirm