Posts

Showing posts from June, 2023

pyForEachCount In Pega

Image
pyForEachCount holds the current iteration number. You can examine (but not alter) this value in the step.                 When processing the For loop or iterating over a Value List or Page List property, the parameter param.pyForEachCount holds the current iteration number.  You can examine (but not alter) this value in the step. For example, to iterate only over the first ten  pages or values, you can exit the iteration when pyForEachCount is greater than 10. In below example we will see how we can use pyForEachCount in data transform and set value in .pxResults.

pxSubscript and pxListSubscript Properties In Pega

Image
  .pxSubscript   And  .pxListSubscript Property-Set                         CasePg.Stakeholderlist Param.Indexpurpose  = "Index_Stakeholderlist" Param.InsIndexedKey  =  "CIGNA-CIGNAAUTO-WORK"+CasePg.pyID local.cnt  =   .pxListSubscript Param.IndexCount = local.cnt-1 How to get index value from pagelist?  The property pxListSubscript will hold the index of the current page that you are in How to get index in a pagelist during iteration While iterating in a pagelist Example : EmployeeList To refer to page at that point: we use EmployeeList(<CURRENT> ) But how to get the index if we have to write some condition, like at index= nth position => achieve some logic. Answer : pxListSubscript Pega provides one property called pxListSubscript which is declaratively calculated and kept at each page level in a pagelist. We can use it instead of setting  a property a...

When Rule Expression For Checking Given Case Is Parent Or Not

Image
 Hi, In this blog I will show the most frequently used when expression that we used to check if the given case id is of parent case or child case. For demonstrating this, I created one Demo Activity. And I am passing Case id using Parameter i.e Param.pyID . The expression for checking Given Case Id is of Parent Or Child Case !@pxContainsViaRegex(Param.pyID,"CA\\-[0-9]+\\-[0-9]+",false) The OOTB function which I used here is @pxContainsViaRegex() Hope this post is helpful for all. 😊

Frequently Used Date Expressions In Pega

Image
 Hi, In this post I will show some of the frequently used date expressions in pega. Before starting we will see some of the date subscripts used in date functions. For Ex:   If date is =  05/March/2023 yyyy = Year => 2023 YYYY => 2023 MM = Month => 03 M=> 3 MMMM  ===> March MMM ====> Mar dd = Date/day  => 05 d ===> 5 1) pxFormatDateOnly(CurrentDateTime(),"yyyyMMdd","MM/dd/yyyy")   Here, CurrentDateTime()  = 20230618T025027.005 GMT                                                                                CurrentDateTime() returns the current date and time. pxFormatDateOnly() = Format/reformat a Date Time string using a specified parameters. Output  =  06/18/2023  { which is 18 June 2023} 2)...

What is template in Angular?

Image
Template                                                                                   A template looks like regular HTML, except that it also contains Angular template syntax, which alters the HTML based on your application's logic and the state of application and DOM data. Your template can use data binding to coordinate the application and DOM data, pipes to transform data before it is displayed, and directives to apply application logic to what gets displayed. For example, here is a template for the Tutorial's HeroListComponent. <h2>Hero List</h2> <p><em>Select a hero from the list to see details.</em></p> <ul>   <li *ngFor="let hero of heroes">     <button type="button" (click)="selectHero(hero)"> ...

Angular Basic/Important Commands

Image
 Angular Commands Note:- First come inside work space of your project. From Angular 14 onwards for building Angular project ng build --configuration production Npm Version Command npm --version Node Version Command node --version Angular Version Command Shows Angular CLI version. It is stated below − ng version To create an application in Angular, Syntax −          ng new <project-name> Ex: To create CustomerApp run below command ng new CustomerApp For creating component Syntax − ng g c  Ex: F:\Angular Training Sah\Angular Project\backend> ng g c <component_name> CREATE src/app/test/test.component.html (19 bytes) CREATE src/app/test/test.component.spec.ts (585 bytes) CREATE src/app/test/test.component.ts (268 bytes)      CREATE src/app/test/test.component.scss (0 bytes)      UPDATE src/app/app.module.ts (1633 bytes) Note:- --skip-tests option to avoid generating test file i.e. .component.spec.ts Ex:  F:...

Deploying Angular Project To GitHub Using GitHub Pages

Image
Note: node --version = v14.20.0 npm --version = 6.14.17 ng version Angular CLI: 14.0.0 Node: 14.20.0 Package Manager: npm 6.14.17 OS: win32 x64 Angular: ... Package                      Version ------------------------------------------------------ @angular-devkit/architect    0.1400.0 (cli-only) @angular-devkit/core         14.0.0 (cli-only) @angular-devkit/schematics   14.0.0 (cli-only) @schematics/angular          14.0.0 (cli-only) First Open your project in vscode editor, and then open terminal Now open your Git account and create new repository in Git. Go Back to vscode terminal, and type command  ng build --configuration production --base-href "https://AbhiGit799.github.io/demo-ang-sitegit/" Here,   "https://<username>.github.io/<repo-name>/" https://AbhiGit799.github.io/demo-ang-sitegit/ you can take from url as shown be...