Question

I have two schemas;

src.xsd
destination.xsd

src.xsd has 2 dates and 1 string

-FromDate (example: 2001-01-01)
-ToDate (example: 2002-01-01)
-Intervaltype (example: 'A long year')

dest.xsd has 1 string property

-Query

I would like to map this so that I achieve a concatenated string in the Query property in the destination schema, like:

"WHERE date1 >= 2001-01-01 AND date2 <= ToDate AND IntervalDescription = 'A long year'"

I've achieved this by using the "string concatenate" functoid.

The problem is that the dates are optional, and i would like to set "default" values in the mapping if none are supplied in src.xsd. In that case i would like

 FromDate to be the current date - 10days 

and

ToDate to be de current date

How can this be achieved?

Thanks for your help!

Was it helpful?

Solution

The solution was quite simple,

FromDate      -> LogicalDate -> ScriptingFunctioid -> StringConcatenate -> Destination
FromDate      ---------------->
ToDate        -> LogicalDate -> ScriptingFunctioid ->
ToDate        ---------------->
Intervaltype  -------------------------------------->
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top