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***
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,
Posted: 3 years ago
Posted: 16 Jan 2020 10:47 EST
Marc Lasserre (MarcLasserre_GCS)
Technical Account Manager
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.
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.
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()