Run OBIEE Agent via Button Event - Part 2

In the Part 1, we have seen how to create Agent Run button.

In this exercise, let us look at one specific requirement.

The Admin should be able to execute the agent from the OBIEE dashboard only when the difference between the Next Run Date of the agent being selected from the dashboard prompt and current sysdate is no more than 15 days.

Let us start our exercise.

In the last exercise we say 3 agents. Go and edit their Schedule Time/Frequency.

Please note that you must first build a small subject area using scheduler tables in OBIEE.
The detailed document can be found in Oracle support. ( DOC ID - 1227908.1)

In my case I have it in my OBIEE application so I am just extending it to suit my needs.
It is called Scheduler Jobs.

From this Scheduler Jobs SA,

Pull Agent Name, Agent Path and Next Run Time column in the report.

On top of it, we shall add two calculated columns.

One is sysdate or current date and another is difference between next run date and sysdate.

See below snaps.

Here is the output. Look at the Difference Column. 

In the above snapshot, look at the next run time. I have in the beginning of this exercise changed the schedule times of those 3 agents that we saw in the Part 1.

We shall be using the report Agent - ConditionToDisplay in another report as a filter.

Let us see.

Create one more report using Scheduler Jobs SA.

Take Agent Path column and make it IS PROMPTED.

Take one more column. Any column. Go to its column formula and write 

cast (15 as double)

Look here.CODE column---> 

Now look here carefully, we shall be using the report Agent - ConditionToDisplay as a filter
condition report.


In the same report, edit the No Data view as shown below. This report name is Checks.


Now Go to Dashboard editor.

Repeat the same exercise.

Add Variable Prompt in 1st section.

Add Static Text with JS code in the 2nd section.

In the 2nd section condition, select Checks Report and condition is rowcount is not equal to zero.

Done. Save changes and Run the dashboard. 

Read the No Data message. It is designed as per the requirement.

Please once scroll up and see the output of Agents- ConditionToDisplay report.

The Difference column value of AgentSimple is 210. That is more than 15.

Hence when you select this agent from the prompt in this dashboard, you should not be able to execute it. 

Let us see.

See below 2 agents. User can execute them as the difference count is less than 15.


Now look at AgentSimple. 

Yes so we are unable to execute it from this dashboard page as the difference between the next run date of this agent and today's sysdate of the machine is more than 15 days.

Thank you. 

Run OBIEE Agent via Button Event - Part 1

Before I begin to write anything I must note that I have taken the Java script code from

I have done modifications to the code according to my OBIEE webcat setup.

Let us start the exercise.

I have created 3 agents as shown below.

Capture the paths of these agents as we are going to create one variable prompt using them. 

Look here.

Variable Prompt name is PATH.

Now open the JS code and in the below line

// set agent path
ibotHandler.tItemInfo = {'path': '/shared/Example agents/Test Agent 01'};

Change the path of the agent in the shared folder to '@{PATH}'


Now, Create one intermediate report. We shall be using it in Guided Navigation Condition.

Please focus on the column expression and the advanced SQL filter.

Go to Dashboard Editor.

Add the variable in first section.

In the second section, add the static text object. Put the code. Enable HTML.

In the second section condition, add below condition :

Okay, so we are done. Save the changes and Run the dashboard.

Select any agent from the list.

Click on Run Agent Button.

Agent is running. .. ..

Agent has executed successfully.

Font Size and Colour Prompt

Hello !

In this exercise, we are going to give the end users an option to select the color and size of 
font of the values in table view.

Let us take a preview of what we are supposed to show on the dashboard.

Select Font Size =3 and Color as Green

Select Font Size =8 and Color as Blue

Let us see how to develop.

Create 2 Variable Prompts. [ COL and FZ ]

Font Color - (red,green,blue)
Font Size - (3,5,8)

Now create a report. Add 3-4 columns.

Go to first column and edit column formula in a following manner.

And in the Data format, choose HTML type.

Make the changes for the remaining columns in the same manner.

Note - In case you have NUMERIC column, you will have to typecast it.

Like this -->

And then change the data format as HTML

That's it. You are done and ready to test the dashboard.