Important Functions
Substr Returns part of a String =Substr("SAP SAP Business
string SubStr(string;start;l Business Objects
ength) Objects";1;12)
string - Any string =Substr("SAP
To Date Turns a character Date =ToDate("24/12/20 24/12/2013
string into a date. ToDate(date_string 13";"dd/MM/ 24/12/13
Give the date ;format) yyyy") 24/DECEMBER/13
format as the ToDate("24/12/13"
parameter to ;"dd/MM/yy")
indicate to Web ToDate("24/12/13"
Intelligence how to ;"dd/MMMM/yy")
convert the string
into a date. The
date format you
provide must
match the format
of the date in the
original string.
Refer to the link
below for the
possible date
formats.
To Number Returns a string as Num =ToNUmber(“5454 5454
a number. If string ToNumber(string) ”)
is not a number,
ToNumber returns
#ERROR.
Universe Name The name of the String =UniverseName([Q Payment – This was
universe on which UniverseName(dp) uery 1]) the Name of a
a data provider is universe.
based
User Response Returns the String =UserResponse(“En USA – If you
response to a UserResponse([dp;] ter Country Name”) entered USA in the
prompt. prompt_string[;Ind Prompt
• You must enclose ex])
the name of the dp - The data
data provider in provider
square brackets. prompt_string -
• You can use the The prompt text
DataProvider Index - Tells the
function to provide function to return
a reference to a the database
data provider. primary keys of the
• If you select more prompt values
than one value in
answer to a
prompt, the
function returns a
string consisting of
a list of values (or
primary keys if the
Index operator is
specified)
separated by semi-
colons.
Word Cap Capitalizes the first String =WordCap(“Payme Payment Due For
letter of all the WordCap(string) nt due for june”) June
words in a string
Year Year in a date Int Year(date) =Year(CurrentDate( 2013
))
Connection The parameters of String =Connection([Que DB Layer: "Oracle
the database Connection(dp) ry 1]) OCI". DB Type:
connection used "Oracle 11".
by a data provider.
Data Provider
name must
enclosed in square
bracket.
Current Date Display the Date =CurrentDate() 12/24/13
Current Date CurrentDate()
formatted
according to the
regional Settings
in your server
Current Time Display the Time =CurrentTime() 2:05:54 PM
Current Time CurrentTime()
formatted
according to the
regional Settings
in your server
Current User Logon of the String =CurrentUser() devuser
Current User CurrentUser()
Data Provider Name of the Data String =DataProvider([C Query 1 – this is
provider DataProvider(obj) ountry]) Default Data
containing a provider name
report Object
Data Provider SQL SQL Query String =DataProviderSQL Select object1
generated by the DataProviderSQL( ([dp1]) from table…
Data Provider [dp])
Data provider Type of a Data String =DataProviderTyp Universe
Type Provider –what DataProviderType e([dp1])
kind of sources ([dp])
used for that
report – Example
- Universe, Free
hand SQL, etc.,
Document Owner Logon user name String =DocumentOwner devuser
of the owner of DocumentOwner( ()
the document )
(the last person
who saved the
document)
Format Date Formats a date string =FormatDate(Curr 2013/24/12
according to the FormatDate(date; entDate();"yyyy/ 12/2013
Specified format format_string) dd/MM")
=FormatDate(Curr
entDate();"MM/
yyyy")
Format Number Formats a string =FormatNumber([ 12,358,210
Number FormatNumber(n Sales];"#,##0") 12,358,210.56
according to the umber;format_str =FormatNumber([
Specified format ing) Sales];"#,##0.00")
Init Cap Capitalizes the String =InitCap("report") Report
First letter of the InitCap(string)
String
Is Date Validate / Check Bool IsDate(obj) =IsDate("12/24/2 0 –FALSE (Value is
whether a value is 013") not an Date)
a Date =IsDate(CurrentD 1- TRUE (Value is
ate()) a Date)
Is Error Validate / Check Bool IsError(obj) =IsError(100/0) 1 – 100/0 would
whether a returns =IsError(100/10) return ERROR in
an error the report
0 – 100/10 would
returns 10 and
there is no error
Is Null Determines Bool IsNull(obj) =If Return the value
whether a value is (IsNULL([Sales])) based on the
null then 0 else [Sales] Sales object data
Is NUmber Determines Bool =If Return the value
whether a value is IsNUmber(obj) (IsNumber([Sales] based on the
a number )) then 0 else Sales object data
[Sales]
Is Prompt Returns whether Bool =IsPromptAnswer 1 – TRUE - if the
Answered a prompt has IsPromptAnswere ed("Enter Country prompt identified
been answered. d([dp;]prompt_str Name") by the text "Enter
Must enclose the ing) Country Name"
name of the data has been
provider in square answered.
brackets.
Is String Determines Bool IsString(obj) =If Return the value
whether a value is (IsString([Country based on the
String Code])) then Sales object data
“TRUE” else
“FALSE”
Last Day Of Date of the last Date =LastDayOfMonth 12/31/13
Month day in a month LastDayOfMonth( (CurrentDate())
date)
Last Day Of Week Date of the last Date =LastDayOfWeek( 12/29/13
day in a Week. LastDayOfWeek(d CurrentDate())
The function ate)
treats Monday as
the first day of
the week.
Last Execution The Date on date = 12/24/13
Date which a Data LastExecutionDat LastExecutionDat
Provider was last e([dp]) e([Sales])
refreshed
Last Execution Time in seconds num =LastExecutionDu 40 Seconds
Duration taken by the last LastExecutionDur ration([Sales])
refresh of a data ation(dp)
provider
Last Execution Returns a time time =LastExecutionTi 4:29:54 PM
Time when a data LastExecutionTim me([Sales])
provider was last e(d
refreshed
Left The leftmost string =Left("SAP SAP B
characters of a Left(string;num_c Business AUS for Austria
string. The hars) Objects";5)
number of =Left([Country];3)
characters to
return from the
left.
Length Number of Int Length(string) =Length("Web 23
characters in a Intelligence
string Report")
Lower Converts a string string =Lower(“SAP”) sap
to lower case Lower(string)
Max Largest value in a Input_type =Max([Country]) USA
set of values Max(Dimension |
Measure)
Month Number Returns the Int =MonthNumberO 12
Of Year Month Number of MonthNumberOf fYear(CurrentDate
the Date. Year(date) ()))
Months Between Return the Int =MonthsBetween 5 – If [Sales Date]
Number of MonthsBetween( ([Sales Date]; is 24-Jun-2013
months between first_date;last_dat CurrentDate()) and Current Date
two dates e) is 24-Dec-2013
Name Of Return the Name String =NameOf([Countr Country
of an Object and NameOf(obj) y])
this function used
to display the
Object Name in
Table Headers.
No Filter Ignore the Filters Input_type = Returns the total
applied in the NoFilter(obj[;All| NoFilter(Sum([Sal sales revenue of
table / block while Drill]) es])) all possible rows
doing the in the block, even
calculation. when rows are
• filtered out of the
NoFilter(obj;Drill) block.
does not work in
query drill mode
because the drill
filters are added
to the query
rather than
applied to the
report data.
• If you end drill
mode with drill
filters applied, the
drill filters
become report
filters and can
change the value
of any objects to
which
NoFilter(obj;Drill)
is applied
Number Of Data Return the Int = 3 – The report has
Providers Number of Data NumberOfDataPr NumberOfDataPr 3 Data Providers.
Providers oviders() oviders()
available in a
report
Number Of Rows Return the Int =NumberOfRows( 200 – Data
Number Rows in a NumberOfRows([ [Query 1]) Provider Query 1
Data Provider dp]) has 200 Rows
Pos The starting Int =Pos("SAP 1
position of a Pos(test_string; BO" ;"SA")
text pattern in a pattern)
string
Prompt Returns the String = *** Query
Summary prompt text and PromptSummar PromptSummar Name:Query 1
user response y() y() *** A.) Enter
of all prompts in Current Time ID
a document. (YYYYMMDD)
20131031 B.)
Enter Prior Time
ID (YYYYMMDD)
20130930
Query Summary Returns information string = QuerySummary()
about the queries in a QuerySummary([dp]) *** Query Name:dp1 *** **
Query Properties:
document. Universe:Index2 Last
Refresh Date:12/24/13 4:10
PM Last Execution Duration:
40 Number of rows: 4,208
Retrieve Duplicate Row: ON
** Query Definition: Result
Objects: Calendar Date,
Product Sales Amount,
Forecast Sales Amount,
Country, Product Type
Replace Replaces part of a String =Replace("SAP SAP Business Objects
string with another Replace(replace_in;r Business
string. eplaced_string;repla OBJECTS";"OBJECTS"
ce_with) ;"Objects")
replace_in - The
Report Filter Returns the Object String =ReportFilter([Count United States – If
information in which ReportFilter(obj) ry]) filter applied in the
report filters applied report / object
to an object or where Country
report =”United States”
Report Filter Summary of the String = *** Filter on Report
Summary report filters in a ReportFilterSummar ReportFilterSummar Report 1 ***
document or report. y(report_name) y() No Filter on Report 1
If report_name is =ReportFilterSumma *** Filter on Report
omitted, ry("Report 2" Report 2 ***
ReportFilterSummar No Filter on Report 2
y returns a summary *** Filter on Report
of all the report Report 3 ***
filters in all the
reports (tabs) in the
document.
Report Name
No Filter on Report 3
*** Filter on Report
Report 2 ***
No Filter on Report 2
Report Name Returns Name of the String ReportName() =ReportName Report 2 – Tab name
report (Tab Name) where Report Name
function is placed
Running Average
=Running Region Sales Running
Average
Average([
Sales])
Country
USA East 3568124 3568124
USA West 300456 1934290
UK North 8489381
4119320.
3