Question
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690556000/a39494fa-2e07-4c7d-943b-bf756b9a20cd.png?itok=6-tr3jbf)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690556000/a39494fa-2e07-4c7d-943b-bf756b9a20cd.png?itok=6-tr3jbf)
Morgan Stanley
CA
Last activity: 12 Jan 2017 18:13 EST
Names of sections rendered at the run time in an application
Question: Is there a way to find out the names of sections rendered on the screen at the run time by a requestor?
I mean all the sections - sections in a flow action and then section inside the sections , that are actually rendered ,
after the hide and show logic is evaluated.On click of buttons , if a section is displayed that too has to be captured.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/5e1df259-88ec-40db-aa4a-a5b27280a5f7.jpg?itok=ChGegHBG)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/5e1df259-88ec-40db-aa4a-a5b27280a5f7.jpg?itok=ChGegHBG)
Pegasystems Inc.
US
Hi,
Can you run tracer for your use case? The tracer log will capture all sections (with names) which are executed for the use case.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Blue Rose Technologies GmbH
BE
Hi,
Please use tracer as it captures all the executed steps.
![](https://accounts.pega.com/sites/default/files/pega-user-image/39/REG-38808.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/39/REG-38808.png?source=PUMINIT)
Pegasystems Inc.
IN
While runnign tracer , you have to enable the strem rules option on.
Then it will show all the UI elements name
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IN
Generally UI Inspector/Live UI is used to inspect the sections being displayed on screen runtime, however you may also use Tracer to identify the Stream name with exact version details.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690556000/a39494fa-2e07-4c7d-943b-bf756b9a20cd.png?itok=6-tr3jbf)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690556000/a39494fa-2e07-4c7d-943b-bf756b9a20cd.png?itok=6-tr3jbf)
Morgan Stanley
CA
Thank you all for your inputs.
I am looking to log the names of the sections invoked by a given requestor. I understand tracer gives me the options to look at the streams being rendered at run time. However , in an end user mode tracer will not be running. The application/framework should be in a position to keep recording the sections that are being invoked as part of a given requestor session and then log it in to a DB table for producing some reports.
For example , as an end user I invoked 5 sections - Personal Info , Education , Experience , Certification , Demographics. Now while I am invoking those sections ( may be as part of a flow action , a wrapper section , hide/show sections) as i work on a case , the intended solution should capture the names of the sections rendered and persist them in a DB table. By the end of that requestor session , system can pull out a report that this requestor invoked the following sections.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690556000/a39494fa-2e07-4c7d-943b-bf756b9a20cd.png?itok=6-tr3jbf)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690556000/a39494fa-2e07-4c7d-943b-bf756b9a20cd.png?itok=6-tr3jbf)
Morgan Stanley
CA
Update: I figured out a hack to work this out.
I wrote a javascript in the UserWorkForm rule that run at a specified time interval ( x milliseconds) and generates the html source of the webform at that instant.
( Similar to right click and view source). I then parse that variable to pull out the section names and then write it to a file , that I create with the ID of the user who was the requestor. I also write the date time stamp in that same file so that I know when did that user invoke a given section.
<script>
function showSource(){;
var source = "<html>";
source += document.getElementsByTagName('html')[0].innerHTML;
source += "</html>";
//now we need to escape the html special chars, javascript has escape
//but this does not do what we want
source = source.replace(/</g, "<").replace(/>/g, ">");
//now we add <pre> tags to preserve whitespace
source = "<pre>"+source+"</pre>";
var activityUrl1 = SafeURL_createFromURL(pega.u.d.url);
activityUrl1.put("pyActivity", "@baseclass.SetOtherRadioToFalse");
activityUrl1.put("pyStreamName", source);
Update: I figured out a hack to work this out.
I wrote a javascript in the UserWorkForm rule that run at a specified time interval ( x milliseconds) and generates the html source of the webform at that instant.
( Similar to right click and view source). I then parse that variable to pull out the section names and then write it to a file , that I create with the ID of the user who was the requestor. I also write the date time stamp in that same file so that I know when did that user invoke a given section.
<script>
function showSource(){;
var source = "<html>";
source += document.getElementsByTagName('html')[0].innerHTML;
source += "</html>";
//now we need to escape the html special chars, javascript has escape
//but this does not do what we want
source = source.replace(/</g, "<").replace(/>/g, ">");
//now we add <pre> tags to preserve whitespace
source = "<pre>"+source+"</pre>";
var activityUrl1 = SafeURL_createFromURL(pega.u.d.url);
activityUrl1.put("pyActivity", "@baseclass.SetOtherRadioToFalse");
activityUrl1.put("pyStreamName", source);
pega.u.d.asyncRequest("POST", activityUrl1);
//now open the window and set the source as the content
//sourceWindow = window.open('','Source of page','height=800,width=800,scrollbars=1,resizable=1');
// sourceWindow.document.write(source);
// sourceWindow.document.close(); //close the document for writing, not the window
//give source window focus
// if(window.focus) sourceWindow.focus();
}
var myVar = setInterval(showSource, 5000);
</script>
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
PEG
US
I would be extremely nervous about a piece of JS in userworkform which runs every 5 seconds. I have seen quite a few impossible-to-reproduce issues involving mysterious Browser hangs or crashes that have come from precisely this type of code in userworkform. It's not clear to me why you want this information, but I think it would be much safer if you just added a button to the portal which ran the above script precisely once, on demand.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690556000/a39494fa-2e07-4c7d-943b-bf756b9a20cd.png?itok=6-tr3jbf)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690556000/a39494fa-2e07-4c7d-943b-bf756b9a20cd.png?itok=6-tr3jbf)
Morgan Stanley
CA
Coher ,
Thank you for your suggestion. You bring up a very valid point. I am going to monitor the bhavior of the above implementation and will update with the results as I get them.We can look at the stats then and discuss if this is a go or a no go.