2642
Points
Questions
19
Answers
200
-
- 1855 views
- 2 answers
- 0 votes
-
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: SynchronousOnce 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- 1892 views
- 5 answers
- 0 votes
-
- 2060 views
- 3 answers
- 0 votes
-
- 1734 views
- 1 answers
- 0 votes
-
Hi Agile_User,
If you want to query for Items, Changes’ Page Two in Page Three, you can do this :
Select * from Item where ITEM_NUMBER=’XXXXXX’;
Select * from Page_Two where ID in (Select ID from Item where ITEM_NUMBER=’XXXXX’);
Select * from Page_Three where ID in (Select ID from Item where ITEM_NUMBER=’XXXXXX’);Select * from Change where Change_Number=’XXXXX’;
Select * from Page_Two where ID in (Select ID from Change where Change_Number=’XXXXX’);
Select * from Page_Three where ID in (Select id from Change where Change_Number=’XXXXX’);Regards,
Arif- 4941 views
- 5 answers
- 0 votes
-
- 2259 views
- 8 answers
- 0 votes
-
- 2259 views
- 8 answers
- 0 votes
-
Hi Keith,
I think it’s a good approach to find out unused items and soft-delete them, if not delete permanently.
You can verify if the items are not having any related objects such as MPNs / Pending Changes /Where Used Item / Cancelled Change and are existing in system for say 1 /2 years. Then you can de-link these items from the dependencies and delete them.
Regards,
Arif- 4320 views
- 6 answers
- 0 votes
-
- 2686 views
- 4 answers
- 0 votes
-
Hi Kevin,
Thanks for the reply. The steps you have share i.e.
1.Taking a prior DB back-up
2. Shutdown App. server.
3. Run A-Verify n clear errors.
4. Execute query to perform Soft-Delete.
5. Run A-Verify to see errorsIf no errors then it’s good. This approach perhaps provides minimum scope for issues however What i was looking that is there a way to hard delete them. Can i proceed with the same to hard delete.
On the other hand, now i am thinking of writing code for the same. Will that be a less risky and better approach compared to DB approach.
Regards,
Arif- 2686 views
- 4 answers
- 0 votes