Discussion

6
Replies
557
Views
Close popover
Colin Beesley (Beezers)
Aegon
Lead Analyst Programmer
Aegon
GB
Beezers Member since 2013 12 posts
Aegon
Posted: May 25, 2015
Last activity: July 2, 2015
Closed

Detect duplicate file name from calling activity

Is there a better way than the following of detecting in the calling activity that a called connect-file rule has encountered a duplicate file name?

When writing the first record to the file, I call a connect-file rule with the "if file already exists" option set to "fail". I have left the Status Message Property set to the default .pyStatusMessage property (and the Status Value Property set to .pyStatusValue).

In the calling activity, even when a duplicate file name is found I still get a StepStatusGood returned, so in order to detect that the "fail" has been triggered I have coded a When condition of @equalsIgnoreCase(@substring(myConnectFilePage.pyStatusMessage,0,7),"Created") - when this returns false this means that a duplicate file name has been found. (Note that myConnectFilePage is the name of the step page used to call the connect-file rule.)

Data Integration
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.