PTC FlexPLM Fundamentals > Samples > Auto Create a New Sample or Sample Request Based on Status > To Enable and Configure the Auto Creation of a Sample or Sample Request Based on its Status
  
To Enable and Configure the Auto Creation of a Sample or Sample Request Based on its Status
1. Create the hidden attributes for Sample and Sample Request.
2. Make sure the Sample Status and Sample Request Status attributes are available. These are out-of-the-box attributes.
3. The Sample Status and Sample Request Status attributes should have enumerated list of values. Administrator must define an enumeration value that will be configured to enable the auto creation.
4. Set the value of the property in
custom.lcs.propeties for com.lcs.wc.sample.autocreate.samplerequest.enable entry to true.
5. Update the below set of property entries with the internal name of the attributes and internal name of enumerated list of values.
The values provided are for example and can be changed as per the requirement.
Root Level Entry:
com.lcs.wc.sample.Sample.sampleStatus=Rejected
com.lcs.wc.sample.Sample.sampleRequestStatus=Rejected
com.lcs.wc.sample.Sample.sampleStatusKey=sampleStatus
com.lcs.wc.sample.Sample.sampleReqStatusKey=sampleRequestStatus
com.lcs.wc.sample.Sample.sampleRequestName=requestName
Adding Hidden Attributes:
com.lcs.wc.sample.Sample.sampleStatusHidden=sampleStatusHidden
com.lcs.wc.sample.Sample.sampleReqStatusHidden=sampleReqStatusHidden
Adding Sequence Attributes:
com.lcs.wc.sample.Sample.sampleRequestSequence=sampleRequestSequence
6. Add new set of property entries for each soft type as needed.
For example, if you want different status values to drive the auto creation one or more soft types, then create entries for the appropriate soft types.
>com.lcs.wc.sample.Sample\\Product\\Sweater.sampleStatus=Requested
>com.lcs.wc.sample.Sample\\ Product\\Sweater.sampleRequestStatus= Received
* 
The above overriding is possible only if the other property entries are set at the root level. As the other property entries refer to the attributes created and those are at root level.
If root level entries are not available, then the sub type level entry would be as follows:
com.lcs.wc.sample.Sample\\ Product \\Sweater.sampleStatus=Rejected
com.lcs.wc.sample.Sample\\ Product\\Sweater.sampleRequestStatus=Rejected
com.lcs.wc.sample.Sample\\ Product\\Sweater.sampleStatusKey=sampleStatus
com.lcs.wc.sample.Sample\\ Product\\Sweater.sampleReqStatusKey=sampleRequestStatus
com.lcs.wc.sample.Sample\\ Product\\Sweater.sampleRequestName=requestName
#Adding Hidden Attributes
com.lcs.wc.sample.Sample\\ Product\\Sweater.sampleStatusHidden=sampleStatusHidden
com.lcs.wc.sample.Sample\\ Product\\ Sweater. sampleReqStatusHidden= sampleReqStatusHidden
#Adding Sequence Attribute
com.lcs.wc.sample.Sample\\ Product \\ Sweater.sampleRequestSequence=sampleRequestSequence
7. If Sample has ten soft types and if the configuration for nine soft types are same as the root level, then the root level entries and the one soft type that requires an override are the only property entries needed because of the inheritance rules.
8. If soft type entry is not available, system inherits its ancestor level configuration.
9. Restart the server.