Skip to main content
14-Alexandrite
November 17, 2025
Solved

How to get an "Element" by ID

  • November 17, 2025
  • 2 replies
  • 208 views

Version: Windchill 13.0

 

Use Case: The "function validateComments" script contains a "document.getElementById("workitem_comment").value" expression. I think the "workitem_comment" value is being used to represent the ID of the field for the "Comments" attribute on a workflow task object.


Description:

I am trying to find out what the element ID would be for the "Process" attribute on the same workflow task object. Please can anybody shed more light on what an element is exactly and how I can query the IDs assigned to different elements that exist in Windchill?

Best answer by BF_13811900

Use the weblink below to see information relating to Javascript elements, IDs and associated properties and methods. 

 

https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById

 

Use the link found below this text to find out how browser developer tools can be used to help identify elements/IDs

 

https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById

 

2 replies

Community Moderator
December 28, 2025

Hi @BF_13811900,

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do. 

 

Regards,

Anurag 

14-Alexandrite
January 2, 2026

Hi. I no longer require support with this one. Please could this post be removed? It seems I am unable to remove it myself.

joe_morton
18-Opal
18-Opal
January 2, 2026

If you're able to share the solution you found, you should be able to mark that as the "Solution". That will help others in the Community in the future, in case they have the same question.

BF_1381190014-AlexandriteAuthorAnswer
14-Alexandrite
January 5, 2026

Use the weblink below to see information relating to Javascript elements, IDs and associated properties and methods. 

 

https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById

 

Use the link found below this text to find out how browser developer tools can be used to help identify elements/IDs

 

https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById