How to extract any case attribute which is being displayed in Mashup UI of a pega app

I am using a mash up of APP A inside APP B , once i launch APP B mashup screen , through mash up i can create a case in APP A and show in the UI for a case of APP B, now the case In APP A) is temporary and only creates case ID when the Case UI inside mashup is submitted.

Requirement - can i read the case id of Case in APP B (being displayed through mashup) and persist somehow in my APP A case

@AgnibhaR16674561 Yes we can read the values outside the mashup using below code.

function getValue(){

var result = pega.web.api.doAction(“PegaGadget”, “getGadgetData”, “pyWorkPage.pxCreateOperator”{callback:callBackForGadgetData} );

console.log(result);

}

In the above function I used “pyWorkPage.pxCreateOperator” parameter for sample use any property, Make sure that property is present inside the Mashup either in visible state or hidden.

Thank you.

@Priyanka Boga provided a screenshot , please check. i was not able to follow your answer

@AgnibhaR16674561 - If the case id needs to be captured. Add the below function and in the browser console you should see the case id of mashup.

Add this function just above the mashup code in parent application. Call this function on any user action to capture the data.I have updated the parameter to retrieve as pyID - it stores the case id. If the property is different change it.

function getValue(){

var result = pega.web.api.doAction(“PegaGadget”, “getGadgetData”, “pyID”,

{callback:callBackForGadgetData} );

console.log(result);

}

Thank you.