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

We are happy to announce the new Windchill Customization board! Learn more.

null value as default for attribute with list

rdrennen
1-Newbie

null value as default for attribute with list

Is there a solution for a soft type attribute in a object with a
discrete set constraint to have the default value blank or null?

If the attribute is a value required constraint and the default value is
blank or null, then it would force the user to select a value from the
list.

Presently I can not find a method to establish a default value of blank
for a discrete set constraint.





Ray

Ray Drennen
MCAD Administrator
Otis Elevator Company
5 Farm Springs Rd.
Farmington, CT 06032
860-676-5619 - voice
860-353-1356 - eFax

ray.drennen@otis.com <">mailto:ray.drennen@otis.com>



4 REPLIES 4
bobg
1-Newbie
(To:rdrennen)

I too need this functionality. Is there a way to achieve it?

Many thanks.
RandyJones
19-Tanzanite
(To:rdrennen)



In Reply to Raymond Drennen:
Is there a solution for a soft type attribute in a object with a
discrete set constraint to have the default value blank or null?

If the attribute is a value required constraint and the default value is
blank or null, then it would force the user to select a value from the
list.

Presently I can not find a method to establish a default value of blank
for a discrete set constraint.





Ray

Ray Drennen
MCAD Administrator
Otis Elevator Company
5 Farm Springs Rd.
Farmington, CT 06032
860-676-5619 - voice
860-353-1356 - eFax

ray.drennen@otis.com <



Set the "Default Value Display Mode" preference to "Do not display". This preference can be found under "Attribute Handling".

This can be achieved by configuring

Wt_home\codebase\config\logicrepository\xml\AllClients.xml



For an example

I created a soft type document com.swasen.Document and have a soft attribute
doctype that has a discrete set constraint.

1. Create a soft attribute doctype with data type String

2. Create a soft attribute com.swasen.Document

3. Add the soft attribute doctype to com.swasen.Document

4. Add a discrete set constraint |Type A|Type B|Type C. Also add a value
required constraint as this attribute needs to be specified when
create/update

5. Set the default value to Type A and save & check-in

6. Configure the AllClients.xml as below. Within <logicrepository> add a
element group for com.swasen.Document as below



<elementgroup>

<logiccontext<br/>dataType="WCTYPE|wt.doc.WTDocument|com.swasen.Document"/>

<objectattributes id="ObjectAttributes">

<attributeeditfield id="IBA|DOC_TYPE"&lt;br"/>defaultValueDisplayMode="none"/>

</objectattributes>

</elementgroup>



Upon bouncing the tomcat and method server, create/update of
<">http://www.swasen.Document> www.swasen.Document UI shows a blank value for
the doctype.



Hope this helps.



Thank you and have a great time.

Best Regards

Swamy Senthil

Principal Solutions Architect

973 216 0456(M); 973 324 2729(W); 866 908 6561(F)

Work Email: swamy.senthil@swasen.com

LinkedIn Profile:
bobg
1-Newbie
(To:rdrennen)

Many thanks Swamy, that did the trick.
Top Tags