need drop down box for entering description after creating item objects (plant, module, document )
Hi Team,
Is there any way to get drop down list to enter description field for users in place of text area while creating a document object? is this achievable through change of configuaration or do we need to use Agile API to achieve, if yes, please help us here.
Please see the screen shot for better understanding
Hi Venkata, it’s not possible to change an attribute type, what I mean is that the description attribute is a text type attribute and you can’t change it.
I suggest that you create required attributes that based on the choose values a groovy script will concatenate those values to create a description in the description attribute.
Post edition will be allowed.
My best
Carlos
Hi Venkata,
You need to Start as Carlos suggested. Creating Page-Three Attributes which you should enter and upon saving description can be auto-populated.
You can explore the knowledge zone and access the training materials and sample code at below URL :
https://myagileplm.com/knowledge-zone/
A sample approach you can try :
1. Create an Event
– Event Type “Update Title Block”
– Select the Object Type say e.g. Part
2. Create an Event Handler
– “Event Handler Type” as “Script PX”
– In Script section write your Groovy Syntax e.g.
import com.agile.agileDSL.ScriptObj.IBaseScriptObj
void invokeScript(IBaseScriptObj obj)
{
objNum= obj.getObjectNumber();
objClsID = obj.getObjectClassId();
m_session = obj.getAgileSDKSession();
yourItem = m_session.getObject(objClsID, objNum);
page_three_attr1 = obj.getValue(Attribute_id).toString();
page_three_attr2 = obj.getValue(Attribute_id).toString();
newDesc = “Something $page_three_attr1 $page_three_attr2 “
if(yourItem.getValue(Attribute_id) != newDesc)
{
yourItem.setValue(Attribute_id,newDesc)
}
}
3. Create an Event Subscriber :
– Event : Link with the event created in step 1.
– Event Handler : Link with the Event Handler created in step 2.
– Trigger Type : Post
– Execution Mode: Synchronous
Once these 3 steps done, when you go an edit those Page Three attributes and then Save it. The Description field will be updated.
The documentation on Groovy you can get in the Knowledge Zone on this Site Only
Regards,
Arif
Venkata I got interested on that matter and I found at
http://www.oracle.com/technetwork/indexes/samplecode/agileplm-sample-520945.html
a groovy sample code that can do exactly what you are looking for, at the page provided search for a file called GenerateItemDescriptionPX.ZIP. It provides the step-by-step on how to create item descriptions based on attributes concatenation.
You can go a little bit further creating events type: Create Object and Update Title Block.
You also can modify “modify parts” privilege avoiding users to modify the automatic created descriptions.
Enjoy, I did.
My best
Carlos.