Sunday 19 April 2020

Page List expression Part 2

Hi Friends, In this post we will see below Page List expression.


PDN help:

https://community.pega.com/sites/default/files/help_v718/definitions/p/pagelist.htm



IsInPageListWhen(whenName, lookIn) -  this expression will return true when any one of the pages in page list  evaluates to true. 


Below is the list of instance in Courses table.



Now when we have to use this expression?

If our requirement is to find  any records having department as engineering  then we can use this expression.

How we can do that.

In the when rule we can check .Department = "Engineering"


Activity:



Obj-Browse: to browse list of records from Course table.



In the property set added the expression to check any pages have the match.



Now the above expression will become true when any pages data evaluates to true against the when rule CheckInPage.

When rule: CheckInPage




Now run the activity and check the result in Tracer.



In tracer we can able to see total 10 records retrieved from table. then the when rule become true.


So lets check the parameter(RetValue) in Parameter Page.



Value is true in Tracer.

So this expression completed.

---- **** -----


IsInPageList(lookFor, lookAt, lookIn) - This expression will provide return value true/false.

LookIn -  pagelist name in which we have to check.
LookAt- Property in Page.
LookFor- which value we have to check in the property.


In Page List CourseList.pxResults we are checking any pages having department = engineering.
In tracer we can able to see the parameter value as true.


Other expression we will see in next post. If you have any doubt ask in comment.😊

13 comments:

  1. Great Work bro as always !!!

    ReplyDelete
  2. Hi Bharat
    i am trying to do same way, but it's returned always fale.

    ReplyDelete
    Replies
    1. Hi friend,

      Can you share the expression provided in property-set.

      Delete
    2. Hi Bharat
      thank you for you quick response
      yes, it's resolved my issue.

      Delete
  3. Hi Can you please explain with real time scenario all the expression like IsInPageList, and CountInpageList

    ReplyDelete
  4. I have to search a property through page group in same way you did for page list. Is there any expression like 'IsInPageList' or 'CountInPageList' available for page group also?
    By the way, thanks for the post. The content is really well explained. Keep on doing the great work.

    ReplyDelete
    Replies
    1. I did search in Function instance with keyword "PageGroup" . I got the below function.

      Utilities • pxSubscriptInPageGroup--(String,String,ClipboardProperty)
      RS:
      Pega-RulesEngine:08-01-01

      This funtion will Returns the subscript of the first entry in the pagegroup that the condition is satisfied for (straight equals, not equalsIgnoreCase)

      Delete
  5. Hi Bharathan,

    I am not getting the return value it showing that false in expression builder test and clip board as well. Can you please let me know the solution for this...

    ReplyDelete
    Replies
    1. Hi bro,

      Is the page list contains pages in clipboard.

      If present this condition should work.

      Share the expression u have provided if possible.

      Delete