0

I need to write an IF condition within the Taleo Connect client, something like the following pseudocode:

IF 
   actual start date > Current 
THEN
   Retrieve Current date
ELSE 
   Retrieve  actual start date
END
Nikita Demodov
  • 553
  • 5
  • 17

1 Answers1

0

Appreciate this is long after the fact; but TCC is something i'm learning so in the hope it helps someone in teh future. I had to fix a date of Birth as a number of people had dates of Birth in the 3rd century for some reason.

This query worked to fix the date of birth to blank. This works fine.

<quer:projection alias="DATE_OF_BIRTH" projectedValueType="string">
            <quer:switchByCriterion>
                <quer:cases>
                    <quer:case>
                        <quer:greaterThanOrEqual>
                            <quer:field path="Birthday"/>
                            <quer:date>1901-01-01</quer:date>
                        </quer:greaterThanOrEqual>
                                    <quer:customFunction name="TO_CHAR">
                <quer:field path="Birthday"/>
                <quer:string>yyyy-MM-dd</quer:string>
            </quer:customFunction>
                    </quer:case>

                </quer:cases>
                <quer:defaultValue>
                    <quer:string> </quer:string>
                </quer:defaultValue>
            </quer:switchByCriterion>
        </quer:projection>

This is my suggested solution based on the query above

<quer:projection alias="StartDate" >
    <quer:switchByCriterion>
        <quer:cases>
            <quer:case>
                <quer:greaterThan>
                    <quer:field path="actual start date"/>
                    <quer:date type="now"/>
                </quer:greaterThan>
                <quer:date type="now"/>
            </quer:customFunction>
        </quer:case>
    </quer:cases>
    <quer:defaultValue>
        <quer:field path="actual start date"/>
    </quer:defaultValue>
</quer:switchByCriterion>
</quer:projection>
u07ch
  • 13,324
  • 5
  • 42
  • 48