cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

PTC Windchill RV&S (PTC Integrity) custom JavaScript/CSS in Item Fields on Desktop Client

MS_9990422
6-Contributor

PTC Windchill RV&S (PTC Integrity) custom JavaScript/CSS in Item Fields on Desktop Client

We are currently trying to enhance the functionality of the Approval Matrix which is generated by a trigger script called MKS_ALM/CreateApprovalMatrix.js

 

The script generates a basic HTML string for display. Since we want to enhance the funcitonality and add more data to the matrix as well as use this type of depiction for other use cases we are concerned that the clarity of a simple table will suffer greatly.

 

Therefore we had the idea of creating tabs (html buttons) and change their visibility via some custom JavaScript code and custom CSS.

 

Contradicting to this article it is indeed possible to make this work within the web client, because by default a scripts/custom.js is loaded. Since this folder/file does not exist within our public_html directory I created it and added a custom function to the script file.

 

Custom CSS was added via a <link> tag like so:

html += "<link rel='stylesheet' type='text/css' href='" + eb.getHostURL() + "/ApprovalMatrix/tabs.css' />";

 

Upon loading a webpage the custom.js script as well as the custom css file tabs.css is laoded correctly and everything does actually work as expected (please see attached .gif).

 

Now, in this article it is mentioned that there is no way to add custom JavaScript to the IPT. But is there a way to load custom JavaScript within the HTML source or is there any other way to use custom JavaScript within the Desktop Client?

I've already tried to specify a script-file via the <script> tag but I am almost certain that any <script> tag is just ignored (because for the webclient I had to load the custom function via the custom.js script; a script tag would not work at all)

 

For now the desktop client display for this item looks awful; see attached png.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
kjain2
14-Alexandrite
(To:MS_9990422)

Hi @MS_9990422 ,

I have tried to perform such kind of cool Scripting language (HTML, JS etc.) based features when i started with PTC Integrity for long time. Over the time i understood longtext field with rich text enabled supports HTML but not all the tag. It has limitation and only supports few tags.

According to your gif what you are trying to perform is very easy doable if doing in web page but in desktop client i don't think so at least i got never success. 😛

 

May be a plain table with nice looking color and proper colspan for differentiating information across user is also not too bad idea if that helps.

PS: Personally, i prefer to show all on single page rather than switching tab because of extra clicks. Of Course, i agree it's easy to show respective information of different users but need to click extra to see other user approval feedback.

PS: Feel free to drop follow up question / feedback.

Vielen Dank / Many Thanks,
Kapil Jain

View solution in original post

1 REPLY 1
kjain2
14-Alexandrite
(To:MS_9990422)

Hi @MS_9990422 ,

I have tried to perform such kind of cool Scripting language (HTML, JS etc.) based features when i started with PTC Integrity for long time. Over the time i understood longtext field with rich text enabled supports HTML but not all the tag. It has limitation and only supports few tags.

According to your gif what you are trying to perform is very easy doable if doing in web page but in desktop client i don't think so at least i got never success. 😛

 

May be a plain table with nice looking color and proper colspan for differentiating information across user is also not too bad idea if that helps.

PS: Personally, i prefer to show all on single page rather than switching tab because of extra clicks. Of Course, i agree it's easy to show respective information of different users but need to click extra to see other user approval feedback.

PS: Feel free to drop follow up question / feedback.

Vielen Dank / Many Thanks,
Kapil Jain

Top Tags