Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

If/Else Conditional Region based on Purchasing Category for PO PDF Output

Received Response
14
Views
1
Comments
Paul Ward
Paul Ward Rank 1 - Community Starter

We are trying to update the PO PDF template so that if 3 specific purchasing categories are used on the Purchase Order it renders some different text on the template. If any other Purchasing Category is used then some other text should be rendered instead.

We want to explore the following options:

  1. Check all Purchase Orders lines on the PO and if all lines have one of those mentioned categories, print the text specific to those categories only, otherwise print the other text. 
  2. Check all Purchase Orders lines on the PO, if at least 1 is one of the above mentioned categories is present, print the text specific to those categories only, otherwise print the other text

I've tried using

<if:CategoryName="AAAA" or CategoryName="BBBB" or CategoryName="CCCC'?> DISPLAY TEXT 1

<?else?>

DISPLAY TEXT 2<?end if?>


The second text renders if I use a category not mentioned in the first condition, but if i use one of the categories from the first condition both sets of text renders.

There may also be added complication in the case of there being multiple lines on a Purchase Order so we also need to know best approach for that.

Would a foreach check be necessary?

CategoryName is found in following location on the XML

<PdfDraftPurchaseOrderLineVORow>

image.png

Any thoughts or tips would be appreciated.

Answers