Skip to main content
12-Amethyst
April 21, 2016
Solved

How to set the default value for a Boolean attribute?

  • April 21, 2016
  • 1 reply
  • 2907 views

How to set the default value for a Boolean attribute? It is displaying "This Attribute does not support default values" but Boolean type support default values.

Attribute.png

Best answer by BhushanNehe

Hi Bhagirath,

I don't think you can change the default value from Type Manager for this attribute. If you want to customize, there is a specific dataUtility used to render the Boolean component you can extend PlanApprovalReqDataUtility and override the getDataValue method and cast the object to BooleanInputComponent and then setValue accordingly. Remember,  if there are related changeactivities the value is set OOTB so you may want to check if the value is already set or not. OOTB dataUtlity is registered in com/ptc/qualitymanagement/capa/xconfs/CAPA.datautilities.properties.xconf.

Regards,

Bhushan

1 reply

2-Explorer
April 21, 2016

That's weird. I am looking at boolean attribute in our dev system. I see option to add default value. Do you have the right type selected?

Regards,

Binesh Kumar

bkontham12-AmethystAuthor
12-Amethyst
April 21, 2016

Hi Binesh,

OOTB they are displaying this message only for few Boolean attributes. But for other Boolean attributes I am able to add default value.

Is it possible to add default values for this attribute?

Plan.png

Thanks,

Bhagirath

2-Explorer
April 21, 2016

Hello Bhagirath,

Which Windchill version are you in? is Approval required an IBA or an OOTB attribute?

Regards

Binesh Kumar