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

null value as default for attribute with list

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

RE: null value as default for attribute with list

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

Many thanks.

RE: null value as default for attribute with list



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".

null value as default for attribute with list

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:
Highlighted

RE: null value as default for attribute with list

Many thanks Swamy, that did the trick.
Announcements
LiveWorx Call For Papers Happening Now!