Use of @Default.PageExists function with a page that contains a parameter

Hi - I need to check if a page is on the clipboard before calling it. (if its not already there it can't be called for the process I am running) The issue is the page requires a parameter. If I check without the parameter the page is not found. Is it possible to use the PageExist function with a parameter passed for the page?

@Default.PageExists("D_CheckList") -> This does not work - page is not found because it exists on clipboard as D_CheckList[F]

@Default.PageExists("D_CheckList['F']") -> This does not work

FYI: Properties on page are referenced like this: D_CheckList["F"].ID

***Edited by Moderator: Pallavi to update platform capability tags***


Keep up to date on this post and subscribe to comments

September 20, 2018 - 2:00pm


From the "D_" prefix on your page name, I can see the page you are looking to find is a data page.  In most scenarios, by design, a data page will load as soon as its referenced if it does not already exist.  You can, however, use findDataPageWithoutLoading, to confirm if it exists without loading it.  A sample approach for this (in a java step):

  1. PRThread currentThread = tools.getThread();
  2. ClipboardPage theDataPage = ((com.pega.pegarules.priv.context.PegaThread)currentThread).findDataPageWithoutLoading("D_TestDataPage");
  4. if(theDataPage!=null)
  5. {
  6. //add code for if exists
  7. }
  8. else
  9. {
  10. //add code for if it does not
  11. }

Hope this helps!


December 27, 2018 - 6:08pm
Response to KurtW_GCS

Is there a version for parameterized data pages?

December 28, 2018 - 4:24pm


Please follow as below.