Conditional Set-Context and Get-Context
I am setting a context variable within a datamap but if I return a null value I would like a condition that will set the variable as a different, already defined variable.
This is what I am attempting:
IFF CONDITION{$Input_wsSchema_testWS/tns:GetAPBatchListResponse/tns:GetAPBatchListResult/ns0:Items/ns0:APBatchListItem/ns0:BatchRunDate = ''} VALUE=[ get-context('varBatchID','') ]
So if the above record is NULL then I would like to use the ‘varBatchID’ variable. The issue comes in when I attempt to validate the XML I get the below error:
Unable to process because XSL is invalid:
Line number: 15
Column number: 349
Error message: Expected ,, but found: CONDITION{
0
-
It seems you are trying to use the IFF condition in the context variables and that is causing the XSL to become invalid. So please try saving the IFF condition in the Global Variable and then use this variable further in your mapping
For more information on global variable refer the developer guide(Transforming Data>>Using Global Variable)
0
Post is closed for comments.
Comments
1 comment