dashboard prompt doesn't work in obiee 11g when using javascript - obiee

I am using obiee 11g.
I have a dashboard with some sections.
I am using javascript code embedded in a text object (contains HTML marked) within the section. The javascript code I use is this:
<script type="text/javascript">
saw.dashboard.onToggleSection('<your-section-id-here>',null);
</script>
The aim is to collapse the sections by default and it works fine.
but after I did this, when I select dashboard prompt value, the value could not be passed to reports.
Could anyone tell how to fix it.
Thanks a lot

That's always the problem when you start scripting something which you aren't supposed to touch in the first place.
Remember that you're doing data anlytics with this tool. You're not creating a vanity "app". Think about what's the actual goal and educate your users.

Related

GlideAjax in UI Page with DIRECT flag enabled

I am relatively new to ServiceNow, and I am building some UI pages where I basically do not need any of the SN structure except for Glide Ajax (I need to get data from a Script Include).
The problem is that when I select "Direct" the Glide Ajax functions are not available any more in the client script.
Does anybody know if this is possible to achieve? I searched everywhere without success.
Thanks a lot!
If you check "Direct", it omits all ServiceNow specific JavaScript and CSS. "GlideAjax" is ServiceNow specific JavaScript.
If the data that you are pulling back from the Script Include is static (meaning that you can pull it when the UI page is loaded) then you can probably do it inside an "evaluate" block in the HTML section of the UI page. You could have your Script Include return a JSON object as a string and store it in a variable. Then you could have your client JavaScript parse that variable. I am not a Jelly expert, so I would be curious to know if it works.

PL/SQL Content to PDF print in Oracle Apex 5.1.3

I designed invoice by PL/SQL content with HTML and CSS but I can't set up properly page. And I can't print in PDF format.
If you just started with Apex, perhaps you'd rather use its Wizards which will help you in creating process. Although you can create a page using HTML commands - why would you?
Invoice is, I presume, stored into a table. If that's so, I'd suggest you to create a "Report with form on table" page - it'll create
interactive report, which will let you browse through all invoices you created
form, which will let you create new invoices, update or delete existing ones
Try it; it shouldn't be difficult at all.
As of printing reports in PDF format: here's what I (we) do:
I create a report using Oracle Reports Builder
put a RDF onto our IAS (Internet Application Server) machine
place its entry into the CGICMD.DAT file
call the report from Apex using a dynamic action on a button, using 2 steps:
PL/SQL, which composes URL (and adds parameters' values)
JavaScript, which calls the report (using window.open)
I understand that not everyone has the IAS up and running; it isn't trivial task at all. Quite some time ago, for my own amusement, I installed Apache Tomcat and JasperReports, just to see if I can make it work. I did. However, as my company uses IAS & Oracle Reports, I abandoned that approach.
Someone else might have other suggestions; wait a little bit for them to answer.

Oracle APEX 4.2 How to store string and access from any page?

I'm a complete noob and have only been learning this since last night.
I have an APEX application with a few forms and reports that I have managed to get working correctly if I provide the exact SQL statement in the source box. What I want to do is be able to set a variable that I can access from any page.
I want to be able to return its value to use in my SQL source clause in my forms when the pages load and I also want to be able to assign its value maybe via a process, branch or button (i'm still learning what they are propperly) on any page.
I've been at this for hours now and the tiny amount of help I can find on this is completely beyond me and its driving me mad, so if anyone can help me figure out how to do this it would be hugely appreciated.
You can create one application item (Shared Components -> Application Items) and then set it from your PL/SQL code using APEX_UTIL package (apex_util.set_session_state('TESTE', 'Hello').

Load JS widget in Angular View

I have a widget that I want to plug into my angular view. I'm not sure I'm explaining it right but the code I get from the site that makes/hosts the widget is below:
<script src="http://www.somesite.com/widgetfile.js"></script>
This works perfectly fine on a standard html site (just a simple html file loaded locally in my browser). It loads the external JS file and does a document.write onto my DOM as far as I can tell.
The problem I'm having is putting this on a view in an Angular app I've built. I thought it would be the same thing as just copy/pasting the single line of script that the site gave me, but it doesn't work... error i get is below (Chrome).
Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.
I can't use something other than document.write because I don't have access to the file itself, the site that generates the widget does that for me. I've tried doing $http get request in my controller than putting that to a scope variable to be put on the DOM, but I get an error about cross domain security.
Any thoughts? This seems super basic to me since there are thousands of sites that offer "One line of code to embed a widget"... and it works in basic HTML pages. Am I missing something stupid (keep in mind that yes, I did copy and paste the widget script directly from the site that hosts it).
Thanks for the help. I'm pretty new with coding and newer at angular, but this seems like something that should be borderline plug-n-play and not need some complex cross domain workaround.
Try these with these two links.
http://ngmodules.org/modules/angular-widget
https://github.com/cztomsik/ng-widgets

CKEditor: How to manually trigger ACF(Advanced Content Filter)

With older version of CKEditor, I use following code to manually trigger Advanced Content Filter before submitting the content to server, but this stopped working for Version 4.4. I wonder is there a way to manually trigger the ACF and/or other kinds of content validation in CKEditor?
editor.setData(editor.getData(););
Your solution actually worked for me! To be more precise, I used CKEDITOR.instances['instance_name'].setData( CKEDITOR.instances['instance_name'].getData() ) and it worked!
To other people asking: this can be very useful even if you have ACF turned ON; in our app there's a number of situations that we manipulate the DOM inside CKEditor directly using jQuery for some very custom features we have (we actually create some UI inside the editor area), but we don't want that forbidden HTML going to the server and this solution works perfectly.
(Of course we always sanitize on the server as well)
For us this
CKEDITOR.instances['instance_name'].setData( CKEDITOR.instances['instance_name'].getData() )
didn't work, but getting the data with 1 in the arguments worked.
CKEDITOR.instances['instance_name'].setData( CKEDITOR.instances['instance_name'].getData(1) )

Resources