Conversation


Tata Consultancy Services
IN
Last activity: 3 Oct 2025 11:41 EDT
Set Value to pyWorkPage in Component
Hi everyone , Im trying to create a component , Im getting pyGUID with this
const guid = getPConnect().getValue('.pyGUID');
I need to set this to some value in workPage , but my current context is data object , i need it to store it in some place so i can access from case context . Im good with storing it in parameter page , or temp page or in work page . Please help me with this
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 6 Oct 2025 3:12 EDT

Pegasystems Inc.
GB
@DeepikaShankar could you give some more details on your scenario? DX Components, and Constellation DX API's in general, won't allow you to set properties that are not on the form. The only way I know around it is to use a saveable datapage.
We recently did this on a project, set a property (data reference) to the value of this datapage so that the DX Component could send us some contextual information. The only caveat is if you use that property in a data transform or post processing, you might need to refresh it as it will cache between calls. (remove it in a DT)
-
Joshua Helmbrecht


Tata Consultancy Services
IN
Thanks @MarcCheong , @Josh Helmbrecht for your valuable inputs. I will try the suggested approach
-
Marc Cheong


Pegasystems Inc.
US
@DeepikaShankar, As Marc mentioned, we may need to understand more details about the component you're attempting to build. It is important to know that on the client side, we store data in the Redux Store, until Save for Later, or Finish Assignment / Submit button is called, in which the values from the Redux Store are written to pyWorkPage. From your description, it sounds like you are trying to write a value like pyGUID to a property on a case? I would consider the below API calls to be called in sequential order to update a property with your desired value. You may be able to include the field and use a custom condition to hide it, so that it is tracked by the redux store. updateFieldValue
-
Marc Cheong


Pegasystems Inc.
US
@DeepikaShankar As @Josh Helmbrecht was mentioning you can write property on a case using the Actions API - you might need to validate that field as well using the getValidationAPI as shown below.
const pConn = getPConnect();
const actions = pConn.getActionsApi();
if (!IDField) {
pConn.getValidationApi().validate(IDField);
}
actions.updateFieldValue("caseInfo.content.IDField", IDField);
actions.triggerFieldChange("caseInfo.content.IDField", IDField);
-
Joshua Helmbrecht Marc Cheong


Tata Consultancy Services
IN
Hi @RichOren, Thanks for you reply , will updateFieldValue update the value to the case context , even if it gets triggered from different context.


Pegasystems Inc.
US
@DeepikaShankar Yes, updateFieldValue
can update the value to the case context, but only if the context matches the one where the field is defined or accessible. If triggered from a different context, it may not behave as expected unless the field is properly scoped or exposed in that context.
-
Marc Cheong


Tata Consultancy Services
IN
Hi @RichOren , I attempted the following implementation:
const guid = pConn.getValue(".pyGUID"); if (!guid) { console.error("❌ pyGUID not found in current context"); return; } const propPath = "caseInfo.content.pyText"; actions.updateFieldValue(propPath, guid); actions.triggerFieldChange(propPath, guid); However, this is not working as expected. Could you please let me know if I am missing something?


Pegasystems Inc.
US
@DeepikaShankar Can you share what errors in the console log you are observing? I would recommend installing the Redux plugin from Chrome to watch how data is written to the Redux Store. You can use PCore.getStore().getState() in the browser console, and observe the contents of the redux store to validate if your field has been written too. I assume you may have instantiated actions above const guid? (const actions = pConn.getActionsApi();) Where are you trying to place this Component, inside the data object UX tab? Is it a widget, template, or field?


Tata Consultancy Services
IN
I have instantiated actions
above const guid
. After modifying the implementation, there are no errors in the console.
My requirement is to have a button within the table that opens a modal dialog box to edit and update a record. I initially tried using OpenDataObjectAction
, but the form refresh actions did not work as expected. Therefore, I am considering using openLocalAction
, but I need to be able to pass the GUID so that the corresponding record details can be fetched.
Additionally, I have another requirement: I would like the table to automatically reflect new records when they are added. Currently, I am using pxC11NPublishDatapageUpdate
to notify the user to refresh the table, but this does not provide a smooth user experience. Is there an alternative approach to achieve this?


Pegasystems Inc.
US
@DeepikaShankar Thank you for clarifying the ask. What version of Pega are you utilizing? I ask this because we have reserved update Modals for Tables using Embedded Field Types as Lists. Embedded Lists are also for adding new records to tables. Thus, Embedded Fields are purposeful for CRUD operations. Data and Case References are for selecting or referring to records. Are you using the Platform product, or the Customer Service product? There would be differences between how you use a local action as behavior on a service case vs a platform case differs from a context perspective. If you try to use a local action on a Case/Data Reference to launch a modal, you may end up submitting the main assignment on submit of the modal since the context will be the same as the main case. You would need to create a new pConnect component inside your DX Component to separate out the context, thus making the component more complex. It will be important to understand, that we only send data to the server on save-for-later and submit/finish assignment, so you won't likely be able to refresh a data or case reference object to show a new record if you force it onto a Case / Data reference field.