Skip to main content
Question

How to define string-based date identifier in TX Enhanced Connector

  • June 16, 2026
  • 0 replies
  • 5 views

Forum|alt.badge.img+2

Hi,
In one of my CData connections i have a RSD file for an endpoint with the follwing code for startPeriod and endPeriod
 

<api:set attr="out.TodayDate" 					value="[dummy | CURRENT_DATE()]"/>
<api:set attr="out.StartPeriodYear" value="[out.TodayDate | year()]"/><api:set attr="out.StartPeriod" value="[out.StartPeriodYear | insert(4,01)]"/>
<api:set attr="out.EndPeriod" value="[out.StartPeriodYear | insert(4,12)]"/>

This i refer to in POST statement in 

{
"fromValue": "{startPeriod}",
"restrictionType": ">=",
"columnName": "period",
"relDateCrit": ""
},
{
"fromValue": "{endPeriod}",
"restrictionType": "<=",
"columnName": "period",
"relDateCrit": ""
}

Is this the correct way - instead of hard coding? 


 

Name Value
todayDate CURRENT_DATE()
startPeriodYear year(todayDate)
startPeriod insert(startPeriodYear, 4, '01')
endPeriod insert(startPeriodYear, 4, '12')

 

And then, in the window above:

{
"fromValue": "{startPeriod}",
"restrictionType": ">=",
"columnName": "period",
"relDateCrit": ""
},
{
"fromValue": "{endPeriod}",
"restrictionType": "<=",
"columnName": "period",
"relDateCrit": ""
}