LuisA994 Member since 2019 4 posts
Posted: July 29, 2020
Last activity: September 16, 2020

Pega DX API Datapage Troubles with Angular

Hi folks,

We are trying to use DataPage in Pega so that use in Angular app.

My datapage works fine in Pega. However when I test in Angular app it doesn´t work. I get this error:

core.js:4117 ERROR TypeError: Cannot read property 'length' of undefined     at DropdownComponent.push../src/app/_fieldcomponents/dropdown/dropdown.component.ts.DropdownComponent.ngOnInit (dropdown.component.ts:108)     at callHook (core.js:2970)     at callHooks (core.js:2940)....


We identified that the issue is in this block of code in Angular app:

        let dpParams = this.fieldComp.control.modes[0].dataPageParams;         if (dpParams.length > 0) {

          pPage = new Object();

          for (let i in dpParams) {             let sVal : string;             if (dpParams[i].value != null) {               sVal = dpParams[i].value;             }             else {               sVal = dpParams[i].valueReference.lastSavedValue;             }

            pPage[dpParams[i].name] = sVal;           }         }  

If I comment this block the datapage works fine in Angular app. But I don´t think that it will be a correct solution. 

Pls, anyone have the same error? and How could you fix it?


Pega Onboarding for Financial Services 8.2 User Interface Financial Services System Architect
Share this page LinkedIn