CA PPM lookups are a powerful and widely used method to get dynamic values based on user login using parameter mapping or cascaded values into a different lookup etc but today we are going to learn how to leverage the lookups power to render HTML into CA PPM pages to achieve some fancy stuff!!
Before we go into the code, here are some examples of some fancy HTML lookups.
Screen#1 Video is saved in the Knowledge Store and is an embedded YouTube Video – used in organizations for communication and training purposes and help videos for Project / Approval Process.
Screen#2 Images linked to JasperReport –For running jasper report inside an object instance,
example: running Project Status Report from Project general page.
Screen#3Interactive web page with Canvas and input control – For creative UI and input controls for changing view.
Possible benefit in CA PPM:
1) Moreflexibleviews with better userexperience.
2)Interactivedata input based on dynamic parameters passed to HTML.
How can we achieve HTML inside a lookup?
For any CA PPM Lookup to render HTML inside a page via lookup you need to set following lookup properties.
1)Create a Dynamic Lookup with some html data to display.
<h1><a href=”/” id=”logoLink”>My First Website</a></h1>
This is my first webpage! I was able to code all the HTML and CSS in order to make it. Watch out world of web design here I come!
I can use my skills here to create websites for my business, my friends and family, my C.V, blog or articles. As well as any games or more experiment stuff (which is what the web is really all about).
<p>Webpage made by <a href=”/” target=”_blank”>[your name]</a> </p>
</html>’ as html_display
FROM DUAL) Html_sql
2)Create an attribute in custom Object with this Lookup 3)Set Lookup Default Value 4)Set Lookup to Read Only 5)Set “Populatedefault where null”, in case you have already created instance before this attribute creation. 6)Place this Attribute in Create, Edit, filter layout (Note: It does not work in List). 7) Set this Attribute to Pull-Down instead of Browse from Fields
Let’s Check how our First Html Lookup looks like: Screen#1 Filter Layout
Screen#2 Create Layout
Screen#3 Edit Layout
However, Lookup has some limitations. We can not put large sql inside a dynamic lookup as it has restrictions. So, this leads to the use of the KnowledgeStore to save web documents and images, which we can call in our query toachieve better dynamic approach and easier administration.
Let’s achievesome HTML rendering viaKnowledgeStore.
DownloadTimeline.html – this file need to be placed in KS and link needs to be modified in code ashighlightedin bold.
1)Create a Dynamic Lookup with some HTML data to display. For example:
src = “../niku/app?action=dms.viewFile&RhXm0r7tSeUqEr=true&fileId=5000039&fileName=Timeline.html“
width = “400%”
height = “300”
scrolling = “yes” />’ as Html_display
FROM DUAL ) Html_SQL
2)Create an attribute in custom Object with this Lookup. 3)Set Lookup Default Value. 4)Set Lookup to Read Only. 5)Set “Populatedefaultwhere null”, in case you have already created instance before this attribute creation. 6)Place this Attribute in Create, Edit, filter layout (Note: It does not work in List). 7) Set this Attribute to Pull-Down instead of Browse from Fields.
Lets Check how our First Html LookupcollaboratedwithKnowledgeStore is looking Now.
By using these fancy lookups, you can also achieve Project Task interactiveTimelining, Status Indicator over Project, Inline of Sub Object inside Master Object, Navigation with Status Indicator. Also, lot of other stuff can be achieved as your creative thinking goes.