cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to set the default value for a Boolean attribute?

bkontham
11-Garnet

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

1 ACCEPTED SOLUTION

Accepted Solutions
BhushanNehe
14-Alexandrite
(To:bkontham)

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

View solution in original post

5 REPLIES 5

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

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

Hello Bhagirath,

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

Regards

Binesh Kumar

Binesh,

Windchill 10.2 M030. It is an OOTB CAPA attribute.

We have QMS installed with Windchill.

Thanks,

Bhagirath

BhushanNehe
14-Alexandrite
(To:bkontham)

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

Top Tags