Skip navigation
All Places > All Things PI - Ask, Discuss, Connect > Ideas

Make a version of SkipFile() that stops processing the current file immediately

score 1
You have not voted Submitted

Originally posted on UserVoice
The current SkipFile() function tells the PI Connector for UFL to skip the remaining lines in the file, but the PI Connector for UFL will continue to execute the rest of the code in the "per message" section that the current line triggered.

Please consider making a version of SkipFile() that stops processing the current file immediately. This helps avoid unnecessary Else blocks in If statements. This functionality would be similar to returning from a function or breaking out of a loop in other programming languages.

To implement this, consider adding a new function or adding a function argument SkipFile().

Current:
If condition Then
    'Code for invalid input
    SkipFile()
Else
    'Code for valid input
EndIf

Proposed:
If condition Then
    'Code for invalid input
    SkipFile()
EndIf
'Code for valid input

Comments