Topic
  • 5 replies
  • Latest Post - ‏2013-01-09T16:55:11Z by Lumart
SystemAdmin
SystemAdmin
24948 Posts

Pinned topic want to set a textfield mandatory through hook while selecting radio fields

‏2013-01-02T13:37:04Z |
I am working in a project in IBM clearquest version 7.1.2.

There is a field in my clearquest form which is of type radio buttons with 5 options
and second field is textfield.

Requirement is like "If user selects first 3 of 5 options of radio field than the other text field should become mandatory"

Please Reply ASAP if anybody has any clue for this.

Regards,
Prashant Ghodki
Updated on 2013-01-09T16:55:11Z at 2013-01-09T16:55:11Z by Lumart
  • pdubovitsky
    pdubovitsky
    376 Posts

    Re: want to set a textfield mandatory through hook while selecting radio fields

    ‏2013-01-02T14:31:09Z  
    You can use SetFieldRequirednessForCurrentAction API call.

    Pavel
  • SystemAdmin
    SystemAdmin
    24948 Posts

    Re: want to set a textfield mandatory through hook while selecting radio fields

    ‏2013-01-03T07:27:35Z  
    You can use SetFieldRequirednessForCurrentAction API call.

    Pavel
    Hi,

    Thanks for the reply.

    but my requirement is like on selection of any radio options in form,other text field should become mandatory,
    Its not happening on any action,simply selection of radio button options

    thanks,
    Prashant
  • pdubovitsky
    pdubovitsky
    376 Posts

    Re: want to set a textfield mandatory through hook while selecting radio fields

    ‏2013-01-03T15:16:57Z  
    Hi,

    Thanks for the reply.

    but my requirement is like on selection of any radio options in form,other text field should become mandatory,
    Its not happening on any action,simply selection of radio button options

    thanks,
    Prashant
    I am not sure what did you mean. You cannot make radio button selection on the form and/or change field requiredness to mandatory unless you initiated some action to make entity editable.

    Pavel
  • SystemAdmin
    SystemAdmin
    24948 Posts

    Re: want to set a textfield mandatory through hook while selecting radio fields

    ‏2013-01-09T13:47:38Z  
    I am not sure what did you mean. You cannot make radio button selection on the form and/or change field requiredness to mandatory unless you initiated some action to make entity editable.

    Pavel
    Thanks for the post.

    i have used SetFieldRequirednessForCurrentAction API call and it worked too for the above requirement.

    But it is only working for native client,with web client i am getting issue(other field not becoming optional while selecting radio),same is working fine with native client.

    Is this web client specific issue or some issue in my code?

    thanks,
    Prashant
  • Lumart
    Lumart
    87 Posts

    Re: want to set a textfield mandatory through hook while selecting radio fields

    ‏2013-01-09T16:55:11Z  
    Thanks for the post.

    i have used SetFieldRequirednessForCurrentAction API call and it worked too for the above requirement.

    But it is only working for native client,with web client i am getting issue(other field not becoming optional while selecting radio),same is working fine with native client.

    Is this web client specific issue or some issue in my code?

    thanks,
    Prashant
    This is a well known limitation of CQ web.
    Fields dependency (i.e. a change to the value of field A triggers a change to the value, or the requiredness, of field B) works only if field A and field B are associated to any of the following form controls:

    Drop-down list box
    Combo box
    Drop-down combo box

    (see https://publib.boulder.ibm.com/infocenter/cqhelp/v7r1m0/index.jsp?topic=/com.ibm.rational.clearquest.schema.ec.doc/topics/t_enable_dependent_fields.htm)
    So, radio buttons cannot work for your purpose.
    Try substituting them with a drop-down list box.