Showing results for 
Search instead for 
Did you mean: 

Router Snap to check three diff versions of Excel template

New Contributor II

As a source file i receive three diff versions of Excel Template.
Version N
Version N-1
Version Old
The Source excel file contains a cover sheet and there on cover sheet on Cell B1 the excel template version is specified.
I am using a variable $Excel_Template_Version in the mapper to retrieve the value as shown in the below screen shot.

Later on based on the version of the template the Pipeline takes different path and for that I am using a Router snap to check the version.
But while processing the Version N i am getting an error,below is the screen shot of the Router Snap settings.

The error message is furnished below.

“Router expression $Excel_TEMPLATE_VERSION did not evaluate to a boolean value. Instead got type: String”
I believe I m getting this error message because the router snap documents to different output views based on a boolean expression and there in my router snap i have checked the Firstmatch checkbox and if the Template is not N-1 or Old then it throws that above error message. Again, Router expect 1 input and minimum 2 output.
Can i add something like this as output: Version 22.1 || Version 23.1 for Input0.


Do let me know the possible solution to meet this requirement?



New Contributor II

After changing the Router expression I was able to resolve the issue.
$Excel_TEMPLATE_VERSION == ‘Version N-1’ || $Excel_TEMPLATE_VERSION == ‘Version N’

Thanks anyway