Question
Maantic
US
Last activity: 15 Oct 2015 6:21 EDT
Need to change the Tab Name of a WorkObject
I have a requirement where I need to change the Label of the tab name of an opened workobject. For example if my Work Object is showing as "CC-100" in the tab label, I need to change it to "Credit Check"
-
Likes (2)
Chandan Kumar Tautvydas Pagalys -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
JP
Which version of PRPC are you working on?
Updated: 13 Oct 2015 3:38 EDT
Pegasystems Inc.
IN
For Dynamic Containers, pyDocumentTitle property is used to override default titles. This property must be set on primary page.
-
Grant Thompson
Pegasystems Inc.
JP
I have tried below 2 ways on my local PE 7.1.9, but unfortunately neither one worked.
1. Set pyDocumentTitle using pyDefault data transform rule of Work class.
2. Set pyDocumentTitle using pre-data transform rule of flow action.
-
Grant Thompson
Add the following script to HTML fragment called 'UserWorkForm'. (On a side note, this HTML Fragment is by default referred in pyCaseManager, pyCaseWorker portals via another HTML Fragment called WorkFormStandard.)
Make sure that for each case type, you have a property called 'MyProperty' on your work page with the desired tab label set (you can do this by setting a value to .MyProperty in pyDefault Data Transform or pySetFieldDefaults Data Transform for each case type), else the script won't work.
<script>
pega.u.d.setLabel('<pega:reference name="pyWorkPage.MyProperty"/>'); //Replace MyProperty with any property name of your choice
</script>
Pegasystems Inc.
IN
pyDocumentTitle will kick in when it is being change-tracked. For instance, try defining a declare expression on this property. Custom JS is not a good solution.
-
Grant Thompson
Pegasystems Inc.
IN
@Vikas when/which release was this implemented ?
I remember we used pega.u.d.setLabel last time we faced this issue.
-
Grant Thompson
Agora-Group
US
We have it working fine in 717
Pegasystems Inc.
IN
This was done in ML9 and is a more elegant solution than custom JS. If you make sure pyDocumentTitle is being change-tracked, tab title will change automatically.
-
Grant Thompson
Pegasystems Inc.
IN
Yes, It is definitely a better solution than to use js call.
Agree. But for versions prior to 7.1.9, what's the right context to set pyDocumentTitle (is it worth trying in pyPortal page)? Have you guys tried?
Pegasystems Inc.
JP
I have tried below, but it didn't work.
Vikas Raidhan, Can you provide a working example?
1. Define declare expression on pyDocumentTitle to track the value of pyLabel.
2. set pyLabel in pyDefault data transform rule of MyCase.
The result of rendered work object's tab name.
I have tried below, but it didn't work.
Vikas Raidhan, Can you provide a working example?
1. Define declare expression on pyDocumentTitle to track the value of pyLabel.
2. set pyLabel in pyDefault data transform rule of MyCase.
The result of rendered work object's tab name.
Clipboard value of pyDocumentTitle
Pegasystems Inc.
IN
Declare Expression may not have fired probably because the Applies-To class of expression and pyWorkPage is different. Try turning on 'Whenever used' load strategy.
Agora Group Pvt. Ltd
IN
Pegasystems Inc.
JP
hi Zakir,
It seems the only difference of your implementation and mine is the applies to class of the declare expression.
thanks for your confirmation, I will verify it on my laptop later.
Chunzhi