I’m trying to use regular expressions as given below in a branch condition with evaluate labels as true.
/IDOC[0]/SEGMENT1/SUBSEGMENT1/NAME%==/[^TEMP|TEMP$|^TEST|TEST$]/ (same sequence of steps for both values starting or ending with TEMP and starting or ending with TEST )
Neither of these work, I have to give each value separate like below:
/IDOC[0]/SEGMENT1/SUBSEGMENT1/NAME%==“VALUE” OR /IDOC[0]/SEGMENT1/SUBSEGMENT1/NAME%==“value” (Note that || didn’t work , I have to use OR)
But if I have to give like above for point 1, I would have to use the same sequence of steps again and again. Actually for point 1, I have to check for 2 more values with OR.
The incoming doc is an IDoc. Even in the case of XML input, using /[value|VALUE]/ works in one service but fails in the other.
This appears strange, please provide your suggestions on this.
I have used a similar regex in a sequence for an XML document, /[^<?xml version="1.0" encoding="UTF-8"?>]/ this works perfectly.
Is this something to do with the IDoc?
Thank you for your suggestions. What would be the syntax to check for multiple values for a single variable? For eg. %/doc/field%==“value1”||“value2” (can be same operations for both values) and another sequence with %/doc/field%==“value3”||“value4” (different operations for value 3 & value 4) and a default and a null condition to check for.
Above syntax doesn’t seem to work. Question here is to avoid repeating steps for values mentioned with OR, particularly in cases where there are more values to be mentioned with OR.
I am attempting to transfer files to different locations using the Branch switch sequence. The location would be determined based on the ending of the filename. like filename_A.ext will transfer to location A, filename_B.ext will transfer to location B, etc. What expression could help achieve the same?
I tried using the condition %remoteFile% == /[^_A.ext]/ into the sequence label. Also, the evaluate labels was set to true. for the first file with _A.ext as ending, it entered the sequence correctly but for the second file (/[^_C.ext]/), with _C.ext, it again entered the A sequence.
can you provide a Screenshot of your Branch sequence please?
This might help us to understand whats going wrong.
Did you try the other way by specifing the remotefile as a variable to the branch and just leaving the regex (i.e. /[^_A.ext]/) as the label?
Evaluate labels should be set to false then.
Please have a look at the Service Development Help document if there is a note or explanation how to use regex on branches.