SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch

Sec lesson plan_template
Sec lesson plan_templateSec lesson plan_template
Sec lesson plan_templaterhondahall
 
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 Stepscostamary
 
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 Removalcostamary
 
Media q2
Media q2Media q2
Media q2whuluke
 
Yi's SWMS210 presentation
Yi's SWMS210 presentationYi's SWMS210 presentation
Yi's SWMS210 presentationYi Xu
 
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 Stepscostamary
 
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 Systemcostamary
 
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 Centercostamary
 
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 Immediatelycostamary
 
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 Stepscostamary
 
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.0Diacrítica Consultores
 
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 Systemcostamary
 
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 costamary
 
Slide Share Pictures
Slide Share PicturesSlide Share Pictures
Slide Share Picturesdorris49882
 

Andere mochten auch (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
 

Ähnlich wie @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.pdfdhavalbl38
 
Time series analysis in Stata
Time series analysis in StataTime series analysis in Stata
Time series analysis in Statashahisec1
 
Date time function in Database
Date time function in DatabaseDate time function in Database
Date time function in DatabaseSarfaraz Ghanta
 
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)
 
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 2Charles Givre
 
R programming & Machine Learning
R programming & Machine LearningR programming & Machine Learning
R programming & Machine LearningAmanBhalla14
 
Prediction of taxi rides ETA
Prediction of taxi rides ETAPrediction of taxi rides ETA
Prediction of taxi rides ETADaniel Marcous
 
Chapter15 structure
Chapter15 structureChapter15 structure
Chapter15 structureDeepak Singh
 

Ähnlich wie @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
 

Kürzlich hochgeladen

Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 

Kürzlich hochgeladen (20)

Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 

@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