cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Router Snap to check three diff versions of Excel template

UrsVinny
New Contributor II

Hi
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.
image

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.
image

The error message is furnished below.
โ€œerrorโ€:

โ€œ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.

image

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

Thanks
Vinny

1 REPLY 1

UrsVinny
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โ€™
&& $CONTRACT_NUMBER != null

Thanks anyway

๐Ÿ™‚