0

I'm totally new at BI Publisher and XML templates. I'm trying to update a template to add the logo for a new company/organization. The same templates will be used for 3 separate branches/organizations within JD Edwards.

I'm having trouble trying to conditionally set the url code in the alt text of the dummy image. I think it's because the interpreter can't understand having a <?choose:?> tag inside the url{} definition? How can I use a choose function to return the proper string to the url{} definition?

eljefejb
  • 297
  • 3
  • 12

1 Answers1

0

Two options:

Concatenation:

Just concatenate the source location of your image with an XML variable that holds the brand name.

url:{concat('/folder1/folder2/',BRANCH_NAME_XML_ELEMENT,'_LOGO.JPG')}

Assuming your BRANCH_NAME_XML_ELEMENT is WALMART it will then load the image: /folder1/folder2/WALMART_LOGO.JPG

IF Statements

Make three different dummy images. Each with their respective URL for the logo. Then put each image within an if/end if statement. Will make things look like hell in the RTF file, but it will functionally work when everything is rendered.

EdHayes3
  • 1,777
  • 2
  • 16
  • 31
  • It doesn't seem to matter what I do, the dummy image never gets replaced. Is there an error log somewhere that might have some messages which can shed light on what's not working? – eljefejb Mar 26 '21 at 21:39
  • Did your DBA grant all the correct permissions for the folder on the server? – EdHayes3 Mar 30 '21 at 14:28
  • I was able to make it work using three IF statements, so it's not a permissions issue. It does make the template very messy! I think BIP either doesn't like the `choose` statement or the `normalize-space` function I have to use to trim off all of JDE's field padding before comparing the branch code. I don't know which functions can be used where. – eljefejb Mar 31 '21 at 18:15