Question
Stella
US
Last activity: 7 Jul 2020 8:29 EDT
PropertyExists()
When I call PropertyExists() on a page property why does it cause the property to get created on the clipboard? Let me clarify.
It appears that when the page property is set to manual data access it does not get created on the clipboard when using @PropertyExists() on it, but when the property is set to copy from data page for data access then @PRopertyExists() causes the property to get created on the clipboard. Why is this happening this way? What can I call to check if this kind of property exists on the clipboard or not?
***Edited by Moderator Marissa to update platform capability tags****
***Edited by Moderator: Pallavi to update Platform details***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
FR
Hello,
Can you try with PropertyHasValue() instead? What Pega version are you running?
Stella
US
No Good. 8.1.7
Stella
US
One solution I am attempting is where I add another property with manual data access. When the other page property is populated via data page I run a data transform to set the first property to "true". So now instead of checking if the page property exists using PropertyExists() I instead check the other property with manual data access to see if it exists. Still to me PropertyExists() should work on the page property that is copying from a data page but it looks like it is causing an empty property to be created on the clipboard,
Pegasystems Inc.
FR
Why is it not working with the Out-Of-The-Box function called "PropertyHasValue"? The function should check if the property exists first and not creating anything if not.
Stella
US
Since PropertyHasValue() is doing PropertyExists() first and I see that @PropertyExists() is causing it to get created when I call it on its own then that would make sense.
Stella
US
Dang. By supplying optional data mapping in some cases it is causing the page property to clear. That's not going to work.
Stella
US
PropertyExists() does cause an autopopulated property to trigger and auto populate. PropertyExists() calls getIfPresent() api. There is an alternate getIfPresent() api function that takes two parameters, one being the name of the property and another parameter being aAvoidAutoChain. If true is passed for aAvoidAutoChain this will prevent the auto populated property from populating. So I just created my own PropertyExists() function by copying the original and modifying it to call the version of getIfPresent function with 2 parameters.
Updated: 5 Jul 2020 20:51 EDT
Incessant Technologies Pvt.Ltd
AU
Hello,
PropertyExists is a method overloaded function of which one is PropertyExists(String,ActivityName) and the other is PropertyExists(String). Using the second version will check whether the property exists or not on the step page when using in the activity. This will not create the property but instead if we use PropertyHasValue(ClipboardProperty) in the activity if the property is not present it will create the property with empty value on the page.
Stella
US
It does cause an auto populated property to get created as it triggers the autopopulation. You cannot use any version of PropertyExists() for an auto populated property. As I said you must create your own version of the function and use the property getIfPResent()