Condition with variables OR AND not working
-
- Member
- Posts: 122
- Joined: Fri Jun 12, 2020 11:23 am
Condition with variables OR AND not working
I want switch to check if the ID in the metadata is the same as in the filename because the file name is currently created by the user.
When i only check for one of those id-s + email, it works. but when i want to check if either of these id-s is correct + email, the variable does not work.
Should i just create 2 separate connectors for it, or am i approaching the problem wrong? My first guess would be that switch always checks if the name consists of both of those id-s?
Re: Condition with variables OR AND not working
It is a problem of the logic not being correct. You check if the variant of the ID in the metadata is also in the filename and there are two possible variants. This means there is always one variant that will not be equal. So, (A OR B) will always be false. Once you realize this, the solution is obvious.
Disclaimer: as I do not know what is in the right-hand part of the two first conditions the obvious solution may still not work.
Disclaimer: as I do not know what is in the right-hand part of the two first conditions the obvious solution may still not work.
-
- Member
- Posts: 122
- Joined: Fri Jun 12, 2020 11:23 am
Re: Condition with variables OR AND not working
right hand variables are id from metadata
Re: Condition with variables OR AND not working
You have to test for equality instead of inequality:
a part of the filename is equal to something from metadata
OR
another part of the filename is equal to something from metadata
AND
the mail address contains something
a part of the filename is equal to something from metadata
OR
another part of the filename is equal to something from metadata
AND
the mail address contains something
-
- Member
- Posts: 122
- Joined: Fri Jun 12, 2020 11:23 am
Re: Condition with variables OR AND not working
My aim would be to check for inequality, because i want switch to give an error if the data does not match. Is this impossible to do ? My last picture above seems to do the work.
The filename only consists of one of the two identifiers, which in the metadata field is stored in the same path.
The filename is either XXX--D-1234567 or XXX--VL22-7777. The filename is never XXX--D-1234567--VL22-7777
Re: Condition with variables OR AND not working
If you check for equality then the files that are correct will continue that way in the flow.
If you then add a branch for "All other jobs" any file that does not match the conditions set will go thru that branch and you can send your error messsage there.
If you then add a branch for "All other jobs" any file that does not match the conditions set will go thru that branch and you can send your error messsage there.
- Attachments
-
- Skärmavbild 2020-12-15 kl. 08.53.21.png (30.46 KiB) Viewed 5435 times
Enfocus Switch, Enfocus PitStop Server, Enfocus PDF Review, HP SmartStream& Kodak Prinergy with RBA
Offset 72x102, Offset Large Format, Digital Large Format and Digital print.
Offset 72x102, Offset Large Format, Digital Large Format and Digital print.
-
- Member
- Posts: 122
- Joined: Fri Jun 12, 2020 11:23 am
Re: Condition with variables OR AND not working
missed that option, thanks!