0

I am new to VTL and have been trying to subtract a variable from a constant. I am sending an integer InstanceId from the back-end as a part of InstId object. I am using VTL as an XML parser. So the input to the parser is like:

<InstId>
  <InstanceId>4098</InstanceId>
</InstId>

!Velocity Code
#set ($start_constant = 3995)
#set ($instanceId = $InstId.InstanceId.TEXT_ )    
#set ($DomainTag = $instanceId - $start_constant)    
!DomainTag Value: $DomainTag
!DomainTag Value: $DomainTag.TEXT_

I tried to print the values using the above two debug statement but, It doesn't print anything. What am I missing?

I am subtracting the variables, in the same way, as stated in this user guide.

Regards, Shivam

iehrlich
  • 3,572
  • 4
  • 34
  • 43

0 Answers0