Question
Capgemini
MX
Last activity: 12 Oct 2022 13:40 EDT
Set a property from another class
I want to set a property that is placed in a -Data class using a data transform that is run from a pyWorkPage class, but I can't get it by calling that property from the Pages & Classes tab.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Bentego
TR
Create editable data page under Data-... respective data class and set respective property of this data page from data transform of work class.
TSPi
IN
@EdgarIvanV Create a page mode property that has page definition of data class and use this page mode property in data transform to set
for example Person is a data class that has name,email,. Phone number and so on
create customer as single page property type in casetype which has page definition as Person. Save it .
now in datatransform set
customer.Name equal “satish”.
Updated: 6 Oct 2022 15:30 EDT
Capgemini
MX
@Satish Sudagoni I tried, but only the property found and displayed in a section of the Work- class changes, but the property found in Data- does not change, as if they are two different properties, but it is the same. The property is in a Data- section, and I set it from Work- with the help of another single page property pointing to the Data- class and a Data Transform, but the property only changes in the -Work- section, even with a "Refresh another section" action on a button, it doesn't change in Data-.
The -Work- section is in one tab, and the -Work- section opens in another tab
Bentego
TR
Kindly share the UI on design time here with indicating their source (clioboard page or data page and etc.) storing their data. Are you using temporary clipboard page or data page for data class section you refer it to somewhere in UI of work page?
Regards.
Mert.
Capgemini
MX
@m.caldag Hello, I am new in PEGA and I do not understand many concepts, what the clipboard shows me are the images that I shared above. The dashboard is a thread and the case screen is another thread on the clipboard.
Bentego
TR
Probably you updated your previous post with adding screen shots because initially I did not see any screen shots in the post or they have not been rendered for some reason. Anyways, when I mention clipboard page, I mean some temporary page you used in some data transform or activity to populate some data and use it on section rule.
First of all, what is the actual requirement here? You have a dashboard which includes some form and see button probably button is opening cases in new tabs or something like that. Why do we need to copy flag value from open case to dashboard tab's form as looks like its an entry point which is opening cases so this part should not be dependent to particular case. I think it is a sample not an exact requirement.
Updated: 7 Oct 2022 14:43 EDT
Capgemini
MX
Hi
We have an application that shows a dashboard (section in the -Data- class), this control panel shows a table with the cases according to the operator, each operator can only see cases with some particular status. The table is updated when a button called "Consultar" is clicked. This button calls a data transformation that sets a flag property to "1", when this property is "1", the table is displayed. In the user interface, the dashboard is displayed in a tab:
When an operator named "Checker" presses a "Enviar a revisión" button (in a section of the -Work- class, ie the case), the case is sent to the next stage of the operator named "Maker". The cases can be consulted from an magnifying glass icon in the dashboard table, in a new tab:
Hi
We have an application that shows a dashboard (section in the -Data- class), this control panel shows a table with the cases according to the operator, each operator can only see cases with some particular status. The table is updated when a button called "Consultar" is clicked. This button calls a data transformation that sets a flag property to "1", when this property is "1", the table is displayed. In the user interface, the dashboard is displayed in a tab:
When an operator named "Checker" presses a "Enviar a revisión" button (in a section of the -Work- class, ie the case), the case is sent to the next stage of the operator named "Maker". The cases can be consulted from an magnifying glass icon in the dashboard table, in a new tab:
The problem is that the case is still displayed in the dashboard table, which allows you to open the case even when the case no longer belongs to "Checker", but to "Maker", the case disappears from the table when click the "Consultar" button again, which is impractical, since the case remains visible to the current operator as long as they don't click "Consultar". The case should disappear from the table when "Checker" clicks the "Enviar a revisión" button found in the case section.
I tried to do the obvious thing, put the same Data Transform on the "Enviar a revisión" button, in a "refresh other section" action, to refresh the dashboard section, it didn't work, the flag property doesn't change on the dashboard section (class -Data-).
I tried with the help of a Single Page property, with the embedded flag property, but the flag property only changes in the case section (-Work-), but does not change in the dashboard section (Data-).
I need that flag property that can be set from the case section (Work) and that the change is reflected in the dashboard section, in order to update the table and that the cases that do not correspond disappear, in a nutshell, that the "Enviar a revisión" button does the same job as the "Consultar" button
Bentego
TR
@EdgarIvanV thank you for details. I got the issue now. I think we should delete the cases table source in dashboard tab after user click "send to maker" button within the particular case opened through magnifier icon column of the table in dashboard. Its better to validate whether case reaches to maker stage without any error and then remove pyDisplayHarness.<pageWhichIsSourceOfCasesTable> then refresh the parent section of the table you already did refreshing based on your previous posts. If you delete the table source as well, Table should be refreshed and the case which is recently moved to maker stage disappeared from the table.
NCS Pte. Ltd
SG
Hi @EdgarIvanV: From the screenshots what I could understand is, you have a Dashboard tab where you set some values. When you perform some action in the Dashboard tab, You are expecting the data to be populated in the case tab (MTO-1387 here). Correct me if I'm wrong.
If this is the case, can you help to understand what is the action you are performing in Dashboard tab can you share the configs too?
In your case, you are dealing with 2 threads ( here Dashboard in one thread and MTO-1387 is another thread). So you have to use a requestor level data page to pass the values. Still it depends on the action which you are performing.
Please share the Action configuration you are doing in Dashboard tab to support further.
Thanks
Updated: 7 Oct 2022 14:21 EDT
Capgemini
MX
@ArulDevan Hi
It's the other way around, I need a flag property found in the dashboard section/tab (-Data-) to be set to "1" with a button found in the case section/tab (-Work-) (MTO) for the purpose of displaying a table on the dashboard when Flag = 1.
This action is also performed by a button on the dashboard, but I need another button in the case section to perform the same action. On the dashboard button, it's simply a "refresh this section" action that runs a Data Transform that sets Flag = 1 and other properties, but the one that matters is Flag.
In short, from the case section/tab you can also set this property to refresh the Dashboard section/tab.
Updated: 9 Oct 2022 16:00 EDT
Areteans
AU
@EdgarIvanV Please try below approach and let us know whether it solved your problem or not.
1. There is an existing Requestor level data page (Pega OOTB).In the table when grid when you click consultant button then set D_PortalContextGlobal.pytemptext="Somerandomvalue".
2. . Use can set this data page (D_PortalContextGlobal) with D_PortalContextGlobal.pytemptext = .pyID on click of "Enviar a revisión" button. Setting pyID since it will change every time you open a new case in a new thread.
3. Put the table grid inside a dynamic layout and give refresh condition in the dynamic layout as below. This should refresh your table section automatically.
Let me know whether the above config helps you or not.
Updated: 10 Oct 2022 19:58 EDT
Capgemini
MX
@VishwajeetD1125 Hello, thanks for the answer.I tried your approach, and it partly works, but the table just won't refresh despite the refresh condition and property change. The table is in an embedded section, and only with this configuration shown below, the flag property (pyTempText) seems to change, otherwise the property stays at the random value (in this case I chose "0").
Even when the property changes with the settings already shown, the table is not updated, I tried with:
D_PortalContextGlobal.pyTempText != '0'
D_PortalContextGlobal.pyTempText Change
But it does not work
Bentego
TR
Hi @EdgarIvanV Looks like D_DashboardmttosPortal data page is the source of the checker cases table. We should delete the instance of data page from the clipboard to be able to allow Pega to repopulate it after refreshing section. Kindly note that if D_DashboardmttosPortal data page has some parameters, you should delete the instance of this data page from clipboard with indicating parameter values or call the java function like sample below without worrying about the parameter values of the data page.
Can you check my last post copied below as well?
@EdgarIvanV thank you for details. I got the issue now. I think we should delete the cases table source in dashboard tab after user click "send to maker" button within the particular case opened through magnifier icon column of the table in dashboard. Its better to validate whether case reaches to maker stage without any error and then remove D_DashboardmttosPortal then refresh the parent section of the table you already did refreshing based on your previous posts. If you delete the table source as well, Table should be refreshed and the case which is recently moved to maker stage disappeared from the table.
Updated: 12 Oct 2022 13:40 EDT
Bentego
TR
Hi @EdgarIvanVIt is a sample java step which is deleting the parametrized data pages without worrying about the parameter values of the respective data page.
Anyways, may I ask what happened after you remove D_DashboardmttosPortal (I am assuming that this is the source of the checker cases table based on the latest screenshots you provided) data page from clipboard? I am expecting that after UI (refresh DashboardVisSinLote section or kindly refresh parent section of DashboardVisSinLote if it fails) refreshed, Pega should re-populate D_DashboardmttosPortal data page because there is no obsolete data page instance in the clipboard because you deleted it after BU sends particular case from checker to maker stage. Can you only test the deleting data page functionality to be able to fully ensure that its really removed from the clipboard after sending respective case from checker to maker? In addition, you are refreshing the DashboardVisSinLote section or parent section of it after BU clicks the send case from checker to maker action/button, right?
Regards.
Mert.
Pegasystems Inc.
IN
Is this duplicate of https://support.pega.com/question/refresh-section-data-class-section-work-class ?