Categories
- All Categories
- 150 Oracle Analytics News
- 28 Oracle Analytics Videos
- 14.7K Oracle Analytics Forums
- 5.7K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 54 Oracle Analytics Trainings
- 12 Oracle Analytics Data Visualizations Challenge
- 4 Oracle Analytics Career
- 2 Oracle Analytics Industry
- Find Partners
- For Partners
How to Add Conditional Region Based on a Calendar Date (RTF Template)?

I am trying, without success, to add a conditional region to an RTF template (Word) based on a date value in my XML.
The logic is quite simple: If the date is on or before 10/1 (October 1), then show this region
The value from the XML output is HIRE_DATE
I have tried multiple ways to get this to work with no success. The documentation does not provide any examples and all the guidance from MOS and CCC is to go to the documentation.
Idea 1: Get month and date, check if it is less than or equal to October 1st:
<?if:to_date(HIRE_DATE,'MM-DD')<=to_date('10-01','MM-DD')?>
That didn't work and triggers this error: XPathException: Parse Error in to_date function.
Idea 2: Append Year to October 1st and compare to HIRE_DATE:
<?if:HIRE_DATE<to_date(LIP_YEAR || '-10-01','YYYY-MM-DD')?>
This one doesn't error, but it doesn't render the region when the condition is met.
I tried a lot of other ways to do it, too, including using the get_day and get_month functions, but they trigger errors, too if I use them in a formula (I can get the month numeric value and the day numeric value, but I can't use them together.
There is one additional region that I need to show, but based on the opposite condition. But first things first, I have to figure this out. Any thoughts?
Answers
-
What is the value of HIRE_DATE displayed in your data model?
Is there a reason you cannot use the year in your conditional?
Thx,
Kevin
0