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

Add Comment
5 Answer(s)

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

Agile Angel Answered on September 20, 2016.

Hi Carlos,

Thank you very much for your answer, could you please provide any websites that will help or any information to achieve this, I am new to groovy.

on September 20, 2016.
Add Comment

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

Agile Angel Answered on September 21, 2016.
Add Comment

Well done Arif, pretty forward example.
Thank you for sharing.

My best
Carlos

Agile Angel Answered on September 22, 2016.

Thanks Carlos. 

Regards,
Arif

on September 23, 2016.
Add Comment

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.

Agile Angel Answered on September 22, 2016.
Add Comment

Hi Carlos,

Thank you very much for your support

Agile Angel Answered on September 23, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.