Tuesday 1 April 2014

BI Publisher Handy snippets for checking if feilds exist and are populated

I found this when lurking about the interwebs looking for  a way to check if a field existed in the XML


• To define behavior when the element is present and the value is not null, use the following:
<?if:element_name!=?> desired behavior when the element exists and is not null <?end if?>
• To define behavior when the element is present, but is null, use the following:
<?if:element_name and element_name="?> desired behavior when the element exists but value is null <?end if?>
• To define behavior when the element is not present, use the following:
<?if:not(element_name)?> desired behavior when the element is not present <?end if?>

3 comments: