SlideShare a Scribd company logo
1 of 5
Download to read offline
6/13/2014 @prompt function in universe | HACK BO 
HACK BO 
Anything related to bo 
Home 
About me 
sitemap 
Type text to search here... 
Date prompt in universe 
October 9th, 2013 huangli+ No comments 
Almost all the BO reports has a prompt to filter data, the date filter plays an important role in report filter, so 
today I am going to summarize some of the most used @prompt in universe. 
Background 
Database: Oracle 
BO: BO 4.1 sp6 
The database function list: trunc, sysdate, last_day,add_months. 
The green character: the variable in function, the variable name may change depend on your system environment. 
The orange character: the orange character is the function script. 
1. Date range filter 
Appearance: Date range filter @prompt function . 
Functionality: The user may use the default current parameters, which means current year and month, or select 
the date he/she wish. 
Implement: 
Datebase.date column BETWEEN 
case when 
@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = 
‘Current’ then trunc(sysdate,’yy’) 
else 
trunc(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, 
{‘Current’},User:-1),’YYYY-MM’),’yy’) 
http://hackbo.com/2013/10/prompt-function/ 1/5
6/13/2014 @prompt function in universe | HACK BO 
end 
AND 
case when 
@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = 
‘Current’ then LAST_DAY(TRUNC(sysdate)) 
else 
LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, 
{‘Current’},User:-1),’YYYY-MM’)) 
end 
2. Begin of the year to selected date filter 
Appearance: Date range filter @prompt function. 
Functionality: The user may use the default current parameters, which means current year and month, or select 
the date he/she wish. e.g. the user may select 2013-03, then the date range would be 2013-1 to 2013-03. The 
start month would always be the January and the year is the user selected year. 
Implement: 
Datebase.date column BETWEEN 
case when 
@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ 
then trunc(sysdate,’yy’) 
else 
trunc(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, 
{‘Current’},User:-1),’YYYY-MM’),’yy’) 
end 
AND 
case when 
@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ 
then LAST_DAY(TRUNC(sysdate)) 
else 
LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, 
{‘Current’},User:-1),’YYYY-MM’)) 
3. Past 12 months filter 
Appearance: Date range filter @prompt function. 
Functionality: The user may use the default current parameters, which means current year and month, or select 
the date he/she wish. e.g. the user may select 2013-03, then the date range would be 2012-3 to 2013-03. The 
user may want to see the trend in the past 12 months, so this kind of prompt is very popular. 
Implement: 
Datebase.date column between 
case when 
@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ 
http://hackbo.com/2013/10/prompt-function/ 2/5
6/13/2014 @prompt function in universe | HACK BO 
then add_months(trunc(sysdate,’MM’),-12) 
else 
trunc(add_months(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, 
{‘Current’},User:-1),’YYYY-MM’),-12)) 
end 
and 
case when 
@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ 
then LAST_DAY(TRUNC(sysdate)) 
else 
LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, 
{‘Current’},User:-1),’YYYY-MM’)) 
end 
4. Past n years filter 
Appearance: Date range filter @prompt function. 
Functionality: The user may use the default current parameters, which means current year and month, or select 
the date he/she wish. e.g. the user may select 2013-03, then the date range would be (2013-n)-01 to 2013-03. 
The user may want to see the trend in the past few years, so this kind of prompt is also very popular. 
Implement: 
Datebase.date column between 
case when 
@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ 
then trunc(add_months(sysdate,-12*n),’YYYY’) 
else 
trunc(add_months(LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date 
object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1),’YYYY-MM’)),-12*n),’YYYY’) 
end 
and 
case when 
@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ 
then LAST_DAY(TRUNC(sysdate)) 
else 
LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, 
{‘Current’},User:-1),’YYYY-MM’)) 
end 
You may customize the script for your own needs, hope it may helpful for you:-) 
http://hackbo.com/2013/10/prompt-function/ 3/5
6/13/2014 @prompt function in universe | HACK BO 
li huang 
Follow 
Copyright secured by Digiprove © 2013 HuangLi 
Some Rights Reserved 
0 
0 
Categories: Universe, Webi Tags: Prompts, universe, webi prompt 
RSS 
Tag cloud 
webi logs Apache BO awk shell webi wis js Mobile geomap maximizing performance FWM query operator sdk cms function webi 
prompt cookie SIA ssl system database requested performance Oracle sso Prompts Administration opendocument Weblogic cms 
universe IES 10901 Mobile chartset input control ep query builder jco cluster Dashboard ticket connection pools apache Xcelsius lov 
chrome extension 
Categories 
Administration 
Architecture 
Mobile 
optimization 
Query builder 
sdk 
Tools 
Universe 
Webi 
Xcelsius 
Blogroll 
http://hackbo.com/2013/10/prompt-function/ 4/5
6/13/2014 @prompt function in universe | HACK BO 
Ads 
Top WordPress 
Copyright © 2011-2014 HACK BO 
Theme by NeoEase. Valid XHTML 1.1 and CSS 3. 
All original content on these pages is fingerprinted and certified by Digiprove 0 
http://hackbo.com/2013/10/prompt-function/ 5/5

More Related Content

Viewers also liked

Sec lesson plan_template
Sec lesson plan_templateSec lesson plan_template
Sec lesson plan_template
rhondahall
 
Media q2
Media q2Media q2
Media q2
whuluke
 
Yi's SWMS210 presentation
Yi's SWMS210 presentationYi's SWMS210 presentation
Yi's SWMS210 presentation
Yi Xu
 
Slide Share Pictures
Slide Share PicturesSlide Share Pictures
Slide Share Pictures
dorris49882
 

Viewers also liked (20)

Question seven
Question sevenQuestion seven
Question seven
 
Sec lesson plan_template
Sec lesson plan_templateSec lesson plan_template
Sec lesson plan_template
 
Remove Windows Stability Maximizer In Few Simple Automatic Steps
Remove Windows Stability Maximizer In Few Simple Automatic StepsRemove Windows Stability Maximizer In Few Simple Automatic Steps
Remove Windows Stability Maximizer In Few Simple Automatic Steps
 
Remove Hotmail Hacker - Guideline For Automatic Removal
Remove Hotmail Hacker - Guideline For Automatic RemovalRemove Hotmail Hacker - Guideline For Automatic Removal
Remove Hotmail Hacker - Guideline For Automatic Removal
 
Media q2
Media q2Media q2
Media q2
 
Yi's SWMS210 presentation
Yi's SWMS210 presentationYi's SWMS210 presentation
Yi's SWMS210 presentation
 
Remove Windows Premium Guard In Few Simple Automatic Steps
Remove Windows Premium Guard In Few Simple Automatic StepsRemove Windows Premium Guard In Few Simple Automatic Steps
Remove Windows Premium Guard In Few Simple Automatic Steps
 
How to remove System Protector From Your System
How to remove System Protector From Your SystemHow to remove System Protector From Your System
How to remove System Protector From Your System
 
Q3
Q3Q3
Q3
 
Get Rid Of Windows Advanced Security Center
Get Rid Of Windows Advanced Security CenterGet Rid Of Windows Advanced Security Center
Get Rid Of Windows Advanced Security Center
 
How To Remove Windows Safety Module Form Your System Immediately
How To Remove Windows Safety Module Form Your System ImmediatelyHow To Remove Windows Safety Module Form Your System Immediately
How To Remove Windows Safety Module Form Your System Immediately
 
Remove Windows Safety ManagerIn Few Simple Automatic Steps
Remove Windows Safety ManagerIn Few Simple Automatic StepsRemove Windows Safety ManagerIn Few Simple Automatic Steps
Remove Windows Safety ManagerIn Few Simple Automatic Steps
 
Workshop de Estrategias Digitales para PyMEs 2.0
Workshop de Estrategias Digitales para PyMEs 2.0Workshop de Estrategias Digitales para PyMEs 2.0
Workshop de Estrategias Digitales para PyMEs 2.0
 
Battleship
BattleshipBattleship
Battleship
 
Peer Mentor workshop 1: McDaniel 101
Peer Mentor workshop 1: McDaniel 101Peer Mentor workshop 1: McDaniel 101
Peer Mentor workshop 1: McDaniel 101
 
Parent Preview- Bursar's Office
Parent Preview- Bursar's OfficeParent Preview- Bursar's Office
Parent Preview- Bursar's Office
 
Remove Windows Pro RescuerAutomatically From Your System
Remove Windows Pro RescuerAutomatically From Your SystemRemove Windows Pro RescuerAutomatically From Your System
Remove Windows Pro RescuerAutomatically From Your System
 
Remove Windows Command Processor In few Simple Automatic Steps
Remove Windows Command Processor In few Simple Automatic Steps Remove Windows Command Processor In few Simple Automatic Steps
Remove Windows Command Processor In few Simple Automatic Steps
 
Venecia due
Venecia dueVenecia due
Venecia due
 
Slide Share Pictures
Slide Share PicturesSlide Share Pictures
Slide Share Pictures
 

Similar to @Prompt function in universe hack bo

Below is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdfBelow is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdf
dhavalbl38
 
Date and Timestamp Types In Snowflake (By Faysal Shaarani)
Date and Timestamp Types In Snowflake (By Faysal Shaarani)Date and Timestamp Types In Snowflake (By Faysal Shaarani)
Date and Timestamp Types In Snowflake (By Faysal Shaarani)
Faysal Shaarani (MBA)
 
Chapter15 structure
Chapter15 structureChapter15 structure
Chapter15 structure
Deepak Singh
 

Similar to @Prompt function in universe hack bo (11)

Below is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdfBelow is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdf
 
Time series analysis in Stata
Time series analysis in StataTime series analysis in Stata
Time series analysis in Stata
 
datetimefuction-170413055211.pptx
datetimefuction-170413055211.pptxdatetimefuction-170413055211.pptx
datetimefuction-170413055211.pptx
 
Date time function in Database
Date time function in DatabaseDate time function in Database
Date time function in Database
 
Date and Timestamp Types In Snowflake (By Faysal Shaarani)
Date and Timestamp Types In Snowflake (By Faysal Shaarani)Date and Timestamp Types In Snowflake (By Faysal Shaarani)
Date and Timestamp Types In Snowflake (By Faysal Shaarani)
 
XPath Injection
XPath InjectionXPath Injection
XPath Injection
 
Data Exploration with Apache Drill: Day 2
Data Exploration with Apache Drill: Day 2Data Exploration with Apache Drill: Day 2
Data Exploration with Apache Drill: Day 2
 
CLIM: Transition Workshop - A Notional Framework for a Theory of Data Systems...
CLIM: Transition Workshop - A Notional Framework for a Theory of Data Systems...CLIM: Transition Workshop - A Notional Framework for a Theory of Data Systems...
CLIM: Transition Workshop - A Notional Framework for a Theory of Data Systems...
 
R programming & Machine Learning
R programming & Machine LearningR programming & Machine Learning
R programming & Machine Learning
 
Prediction of taxi rides ETA
Prediction of taxi rides ETAPrediction of taxi rides ETA
Prediction of taxi rides ETA
 
Chapter15 structure
Chapter15 structureChapter15 structure
Chapter15 structure
 

Recently uploaded

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 

@Prompt function in universe hack bo

  • 1. 6/13/2014 @prompt function in universe | HACK BO HACK BO Anything related to bo Home About me sitemap Type text to search here... Date prompt in universe October 9th, 2013 huangli+ No comments Almost all the BO reports has a prompt to filter data, the date filter plays an important role in report filter, so today I am going to summarize some of the most used @prompt in universe. Background Database: Oracle BO: BO 4.1 sp6 The database function list: trunc, sysdate, last_day,add_months. The green character: the variable in function, the variable name may change depend on your system environment. The orange character: the orange character is the function script. 1. Date range filter Appearance: Date range filter @prompt function . Functionality: The user may use the default current parameters, which means current year and month, or select the date he/she wish. Implement: Datebase.date column BETWEEN case when @Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ then trunc(sysdate,’yy’) else trunc(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, {‘Current’},User:-1),’YYYY-MM’),’yy’) http://hackbo.com/2013/10/prompt-function/ 1/5
  • 2. 6/13/2014 @prompt function in universe | HACK BO end AND case when @Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ then LAST_DAY(TRUNC(sysdate)) else LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, {‘Current’},User:-1),’YYYY-MM’)) end 2. Begin of the year to selected date filter Appearance: Date range filter @prompt function. Functionality: The user may use the default current parameters, which means current year and month, or select the date he/she wish. e.g. the user may select 2013-03, then the date range would be 2013-1 to 2013-03. The start month would always be the January and the year is the user selected year. Implement: Datebase.date column BETWEEN case when @Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ then trunc(sysdate,’yy’) else trunc(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, {‘Current’},User:-1),’YYYY-MM’),’yy’) end AND case when @Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ then LAST_DAY(TRUNC(sysdate)) else LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, {‘Current’},User:-1),’YYYY-MM’)) 3. Past 12 months filter Appearance: Date range filter @prompt function. Functionality: The user may use the default current parameters, which means current year and month, or select the date he/she wish. e.g. the user may select 2013-03, then the date range would be 2012-3 to 2013-03. The user may want to see the trend in the past 12 months, so this kind of prompt is very popular. Implement: Datebase.date column between case when @Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ http://hackbo.com/2013/10/prompt-function/ 2/5
  • 3. 6/13/2014 @prompt function in universe | HACK BO then add_months(trunc(sysdate,’MM’),-12) else trunc(add_months(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, {‘Current’},User:-1),’YYYY-MM’),-12)) end and case when @Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ then LAST_DAY(TRUNC(sysdate)) else LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, {‘Current’},User:-1),’YYYY-MM’)) end 4. Past n years filter Appearance: Date range filter @prompt function. Functionality: The user may use the default current parameters, which means current year and month, or select the date he/she wish. e.g. the user may select 2013-03, then the date range would be (2013-n)-01 to 2013-03. The user may want to see the trend in the past few years, so this kind of prompt is also very popular. Implement: Datebase.date column between case when @Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ then trunc(add_months(sysdate,-12*n),’YYYY’) else trunc(add_months(LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1),’YYYY-MM’)),-12*n),’YYYY’) end and case when @Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent,{‘Current’},User:-1) = ‘Current’ then LAST_DAY(TRUNC(sysdate)) else LAST_DAY(to_date(@Prompt(‘Please select month:’,'A’,’date object‘,Mono,Free,Not_Persistent, {‘Current’},User:-1),’YYYY-MM’)) end You may customize the script for your own needs, hope it may helpful for you:-) http://hackbo.com/2013/10/prompt-function/ 3/5
  • 4. 6/13/2014 @prompt function in universe | HACK BO li huang Follow Copyright secured by Digiprove © 2013 HuangLi Some Rights Reserved 0 0 Categories: Universe, Webi Tags: Prompts, universe, webi prompt RSS Tag cloud webi logs Apache BO awk shell webi wis js Mobile geomap maximizing performance FWM query operator sdk cms function webi prompt cookie SIA ssl system database requested performance Oracle sso Prompts Administration opendocument Weblogic cms universe IES 10901 Mobile chartset input control ep query builder jco cluster Dashboard ticket connection pools apache Xcelsius lov chrome extension Categories Administration Architecture Mobile optimization Query builder sdk Tools Universe Webi Xcelsius Blogroll http://hackbo.com/2013/10/prompt-function/ 4/5
  • 5. 6/13/2014 @prompt function in universe | HACK BO Ads Top WordPress Copyright © 2011-2014 HACK BO Theme by NeoEase. Valid XHTML 1.1 and CSS 3. All original content on these pages is fingerprinted and certified by Digiprove 0 http://hackbo.com/2013/10/prompt-function/ 5/5