Skip to main content
12-Amethyst
Apr 21, 2016 3:14 PM UTC
Solved

How to set the default value for a Boolean attribute?

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

16-Pearl
Apr 21, 2016 6:59 PM UTC

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

5 replies

2-Explorer
Apr 21, 2016 3:40 PM UTC

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

Translate
bkontham12-AmethystAuthor
12-Amethyst
Apr 21, 2016 4:32 PM UTC

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

Translate
2-Explorer
Apr 21, 2016 5:27 PM UTC

Hello Bhagirath,

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

Regards

Binesh Kumar

Translate