BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Want to sponsor BOB? 
Want to sponsor BOB? (Opens a new window)  

General Notice: No events within the next 45 days.

User prompt to store in variable


 
Search this topic... | Search Semantic Layer / Universe Designer... | Search Box
Register or Login to Post    Forum Index -> Semantic Layer / Universe Designer  Previous TopicPrint TopicNext Topic
Author Message
kpiracha
Senior Member
Senior Member



Joined: 23 Mar 2011

Posts: 55



PostPosted: Wed Sep 04, 2019 4:50 pm 
Post subject: User prompt to store in variable

Is there a way for me to prompt the user to enter a date and then I can take the date and store it in a variable in Information Design Tool.

I have the following formula in SQL

PremiumAmount / DATEDIFF(dd, EffectiveDate, ExpirationDate)) *

DATEDIFF(dd, EffectiveDate, @asofDate)

Here "AsofDate' is something that user will enter. I am not sure how I can take that prompt an assign to something. It does not need to be assign to any existing dimensions. All I can think of is create a variable which I don't know how to do in Information Design Tool.

All I need is prompt the user and then take that value and make it part of the above formula.
Back to top
Marek Chladny
Forum Advocate
Forum Advocate



Joined: 27 Nov 2003

Posts: 19316
Location: Bratislava


flag
PostPosted: Thu Sep 05, 2019 1:36 am 
Post subject: Re: User prompt to store in variable

Hi,

Define a new dimension and use the @Prompt() function in its definition. Check the help what the input parameters of the function are.

_________________
BO: BI 4.0, 4.1 | XI 3, 3.1 | XI r2 | 6.x | 5.x
DB: Oracle, MS SQL Server, DB2, Teradata, Netezza
HW: Win, Linux and AIX servers
www.perpendulum.com

Latest Blog Posts
• 2013-07-16 Number of reports in a WebI document
• 2013-04-01 Optional prompts in a universe
• 2012-06-08 Calendar table script for Oracle
Back to top
kpiracha
Senior Member
Senior Member



Joined: 23 Mar 2011

Posts: 55



PostPosted: Thu Sep 05, 2019 12:05 pm 
Post subject: Re: User prompt to store in variable

Thank you. I went ahead and created a new dimension and named it AsofDate and in the definition added the @prompts. See screenshot Prompt.jpg.

I then ran a query inside IDT and used that field which prompted to enter the date. I selected the date and it showed up correctly.

I then went into WebI and did the same thing. It prompted and I added the date but when report was generated it showed the AsofDate as 1/1/01. Not sure whats happening there. I made sure the format was datetime.
Back to top
kpiracha
Senior Member
Senior Member



Joined: 23 Mar 2011

Posts: 55



PostPosted: Mon Sep 09, 2019 1:10 pm 
Post subject: Re: User prompt to store in variable

Any update on this. I am not sure why the date not showing correctly in WebI.
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Semantic Layer / Universe Designer  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0480 seconds using 17 queries. (SQL 0.0099 Parse 0.0010 Other 0.0372)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo