SQL based prompt using value of first prompt

Hi Experts,
Is there any way by which we can use the value selected in first prompt to generate the values in second prompt.
I actually want to write a sql for second prompt using the value selected in first prompt.
Is it possible.
I am aware of the constraint option but it will not be helpful for my requirement.
Regards,
Anurag

hi,
1) Declare a presentation variable in first prompt V1
2) Take a dummy colum in fx section CASE WHEN 1=0 THEN 'Dim - Area" ELSE '@{V1}' END
Save the prompt select value in first prompt and click go it will pass the same value to second prompt
If this is not the requirement let me know
thanks,
saichand.v

Similar Messages

  • Using a Sql Result in Default Value of Dashboard Prompt

    Hi,
    I Create a Dashboard Prompt, this have two dates, the initial and the last for a period to filter. I need to set the default value in the fist and last date of the previous month, for example, if today is 20th of november the default value of initial date has been 1th of October and the last date has been 31th of october.
    I used in default the option 'SQL Results' and use the next sentences:
    SELECT TRUNC(add_months(sysdate, -1), 'MM') FROM dual;
    SELECT TRUNC(last_day(add_months(sysdate, -1))) from dual;
    But when I try to use the dashboard prompt the result is:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT TRUNC(add_months(sysdate,-1),'MM') FROM dual
    When I try to use only select sysdate from dual; the result is:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27004] Unresolved table: "dual". (HY000)
    Thanks for your help.

    Thanks for your help. Finally I solve this issue of
    this form:
    1. I Create a Initialization Block with the next
    sentences:
    SELECT TRUNC(add_months(sysdate, -1), 'MM')
    INITIAL_DATE ,TRUNC(last_day(add_months(sysdate,
    -1))) END_DATE, To_char(TRUNC(add_months(sysdate,
    -1), 'MM'), 'YYYYMM') PERIOD FROM dual;
    2. Then I Create three Repository Variables and
    assign the Initialization Block to this
    3. In the Dashboard Prompt I use the "Server
    Variable" Option in the default and call the three
    variables.
    Thanks again
    EdwinHi: How u access server variable with two fields of date. Actually, I am doing the same work. But I can not do this work. Because this is ok when the date is greater than or less than. When i use between, in default server variable button did not show any text area for reoository variable. I also made initailization block with 2 fields.
    My Task is, I have to initialize the one date coloumn. From Date: and To Date. Pluzz help me in section
    Ali Haroon Nawaz

  • Can I set a Session Variable from a Dashboard Prompt, using values that are

    Hi All
    Trying to set a Session Variable to an integer value, by letting users select a text value from the drop-down list on a Dashboard Prompt. The goal is to set the input parameter to the IndexCol function, but to provide the end users with a text description of what they are setting.
    Select Value Set Variable Value
    My 0
    My Team 1
    My Companies 2
    My Teams Companies 3
    Any suggestions on how to accomplish this? Certainly we could populate the drop-down from a data source, however I don't see how to populate a variable with something other than the values on the screen.
    The IndexCol function is referenced in a Filter in Answers, and I'm thinking to populate a Session variable using the (Presentation) variable value set from the prompt. But how to do this? I see a reference to a function NQSSetSessionValue(), but cannot find documentation on how it works.
    Any clue will be greatly appreciated.
    Thanks

    Hi kishore..
    Looks like the link u have sent uses advanced SQL tab to set session variables. I want to know if I can use "set variable NQ_SESSION.myvar= @something" in the "SQL results" -while creating a dashboard prompt-.
    Purpose: I want the session variable to be set based on whatever report that im currently in.
    And i dont want to use presentation variables because im using a reset button in my page.
    My reset script resets presentation variables and NOT session variables.
    Thanks in advance
    Loy

  • Dashboard Prompt using values not from the table

    Hi,
    I have a requirement from the client to design a dashboard report like the following.
    Dashboard prompt will have 4 filters, three filters come from the table, but the fourth filter will have 3 values not from the table. The fourth filter will have values like "Report with Sales Amount", "Report with Purchase Amount", "Report with both Purchase and Sales". I have three different Table reports designed for each of the fourth filter choices. But how do I implement it, both in the dashboard prompt as well as navigating to the rite report based on the selection.
    Is my approach correct.
    Thanks for your time and help.

    The fourth prompt where you have "Report with Sales Amount", "Report with Purchase Amount", "Report with both Purchase and Sales" you pull a dummy column into the prompt and write a sql in show.
    would be something like
    SELECT Case when 1=0 then "Dimension- Customer"."Cust Name" else 'Report with Sales Amount' end FROM Sales UNION SELECT Case when 1=0 then "Dimension- Customer"."Cust Name" else 'Report with Purchase Amount' end FROM Sales
    and in the prompt set a presentation variable say var_criteria
    Now create report2 for with a some randomn column and another column will have the values that you want to display for example 'Report with Sales Amount'
    Create a filter on the 2nd column and reference the presentation variable var_criteria and default it to 'Report with Sales Amount'
    On the dashboard page in the section place the report and enable guided navigatoin by selecting report 2.
    Please let me know if you have any questions.
    thanks,
    deep

  • Calculated column based on the value of a prompt

    Hi all
    I created a page prompt for the user than he can choose the years period: for example Year: between 2009 and 2015
    In the report I have one of the measures that and I only want to display for the year 2009.I don't want to sum from 2009 till 2015
    currently It calculating the sum from 2009 till 2015 and I only want it for the begining year of the period that the user selects in the prompt
    How can I do that??
    Regards

    try to de-attach the prompt from your SA i.e. once you choose a column month to be in the prompt edit the formula and enter e.g. 'Start month'; then select the same column again and edit the formula and enter e.g. 'End month'; for each of the columns set the operator to equal; add presentation variables for both columns; then in the report use these variables in the filter for the remaining measures and for the one in question use the filter using; see if this would work

  • Show new page table record based on parameter value in first page in ADF

    I have to show a selected record on a new page whose input query value is in first page. For example I choose to edit an order id  by selecting order id and then pressing Edit Record button then in new page selected order record should show. I am working in ADF JSF pages. I can pass parameter from one page to another by pageFlowScope. but how to display selected record on next page.

    any one to help. I want to use an input parameter on first page to edit the table on new page

  • Dynamic WHERE clause logic in SQL based on ITEM value

    Hi,
    I have a report based on following SQL query.
       select dept_no,
           dept_name,
           dept_loc
      from dept
    where dept_loc = :P1_DEPT_LOC
       // If P1_DEPT_LOC is not null, I want the WHERE clause and IF  P1_DEPT_LOC is null, then I don't need the WHERE clause.
       // how can I build this logic in same SQLThanks,
    Deepak
    Edited by: Deepak_J on Mar 11, 2010 4:37 PM

    Deepak,
    If p1_dept_loc were a LOV, this would work.
    SELECT deptno,
    dname,
    loc
    FROM dept
    WHERE ( :p1_dept_loc = '%null%' OR loc LIKE '%' || :p1_dept_loc || '%' )
    Jeff

  • Clearing Value in one Prompt based on selection in another

    Hello,
    I have 2 prompts in my BEx query designer for same characterstics ( one is single value, characterstic variable and another one is Hierarchy node variable ). During the query execution,  If user selects a value in first prompt and goes to the other prompt and selects a value, i need to clear the selected value in the first prompt. And vice versa as well.....
    Please suggest.

    Jagan,
    Let me explain my isue in detail...
    I have created 2 variables for the same characterstics and both of them are ready for input. One variable is of characterstic type and other is Hierarchy node type.
    Now, when user executes the query he sees two prompts. Lets say user selects a value for one prompt and then goes to second prompt and selects another value for the second prompt, then i need to clear the values that was selected by him for the first prompt. And vice versa....

  • Constraining values in Multiselect Prompt-urgent

    Hi Guys,
    I have a problem. I need to constrain the values in a multiselect prompt based on the values of another prompt.
    Now the problem is, the multiselect prompt is constraining the values but when i search for some other value(which should have been constrained) it shows up.
    I tried using presentation variable in the sql query for the prompt. But that also doesnt work.
    Any help please..
    Regards,
    Ronnie

    are you using two different prompts or one prompt with two column selections in it. if it is one prompt then u cannot use pre. variable in the sql query. since the variable will set only after you hit 'go'. create two prompts. one with pre. variable. then use this variable in the second prompt. in your dashboard u need to select a value from the first prompt b4 using ur multiselect prompt.

  • Restricting Prompt values until parent prompt is selected

    OK - this should be simple,but again its causing problems. I have a prompt with a series of drop downs based on the Organisation dimension. They are restricted so that they are filtered accordinly when the values are selected. I need to go one step further and not show any values until de parent value is selected. I am trying to do this with presentation variables and then using SQL to generate the values for each prompt passing as filter the variable for the parent prompt. I am getting an errors on the "@{var_name}" syntax.
    Has anyone managed to do this?

    Sorry, I thought that was what you were asking for (aside from the syntax of using prompts in the SQL statement). So please clarify again. When the user selects a value in the parent prompt, that value is stored in the PV. Now, what exactly do you want the users to see in the drop down of the child prompt?
    I just thought of something... Are all your prompts stored in one prompt file? If so, and the prompts are all set to Report Defaults, values in the prompts won't show until the drop down value is pressed and a value selected. Also, the prompt won't launch the report until the "Go" button is pressed. (By checking "constrain," each subsequent prompt will be properly constrained by the one before, as applicable.)
    If the prompts are in separate prompt files, then above would not be true.
    Message was edited by:
    LC143

  • WebI Prompts using BEx Query Variables

    Hello,
    I have the following issues with WebI report selection input paramaters (prompts) that use BW BEx Query variables. Could anyone please assist?
    Issue 1:
    The WebI report has one mandatory and two optional input paramaters (all paramaters from BW BEx Query). When I execute the report via WebI rich client directly, enter the value for mandatory input parameter and leave blanks for both optional input parameters, the report ran OK and has no issue. However, when I ran it through CMC a strange thing happen: I could not select the value for mandatory input paramater as it requires to have values for both optional input paramaters first (which I wish to have them blank and optional). When I refersh values for the mandatory paramater, it says "List of Values for current prompt requires values for following prompts:...(ie. the two optional parameters).
    Anyone has any idea - it seems like it is a CMC issue for the WebI...
    Issue 2:
    Take the same WebI report above, the issue here is the order sequence of the prompts (ie. the selection input parameters). How can we change/control the sequence of the prompts? Whatever sequence of the varaiables (input paramters) in BW BEx Query, the WebI ignores it. Please advise.
    Thanks & Regards,
    Andy

    I did not see separate thread for issue #1, therefore I'll us this thread.
    I am running into similar issue when I get an error message ''List of Values for current prompt requires values for following prompts: <Name of the prompt>".
    We are using BO V4, SP2, Patch 10 with SAP BW as DB via BEx queries.
    I opened support ticket for this issue since obviousely it's still an issue after applying patch 10.
    It's not an issue when 'Rich Internet Application' option is selected to view report in 'Reading' mode (via Launchpad Preferences then Web Inteligence; defautl value for viewing is 'Web').
    I have not tried to use Client tools but even if it works with Client tools - it is not a solution for us. Our company does not plan to install client tools on end user computers.
    Bigger issue us is that report scheduling invokes Web version (not Rich Internet Application). Therefore we cannot schedule report that is giving us problem described. I tried scheduling report from Launchpad and from CMC and both game me error highlighted.

  • Multi Select Prompt DEFAULT VALUE

    Hi, i have following problem:
    I have two multiselect prompt Country with all Countries and Day with values from 1 to 31. When i load dashboard page, the first and second prompt are empty. First and second prompt have as default value "Report Default". But, when i load the page, the real value of first prompt is ALL Values, in fact report shows all Countries, indeed the second prompt has as default value 1. In fact i see day 1 for all countries. Because two prompts have the different behaviour? How can i set as default value of the second prompt All Choices as the first?
    Thanks
    Giancarlo

    how did you resolve it..?

  • Contents of second prompt list based on value selected in first prompt?

    I need to display two prompts: "Product Family" and "Products". When the user selects a product family, I need the list of products to be filtered to the selected product family. In other words, the contents of the second prompt's list needs to be based on the value selected in the first prompt. Can this be done in Web Intelligence?

    Hello Waters,
    Yes, this can be done in web intelligence if you apply cascading prompts at universe level
    or
    Yes, the second way is use element link in report block between 2 tables one for product family and one for product list ( you don't need prompts in this case...)
    Regards
    Subbarao M

  • How can we change Prompt  default values based on other prompts....

    Hi Experts,
    I have a prompt Status --> DAILY,WEEKLY and MONTHLY.
    If user selects any one of this value the default value in another prompt Startdate and Enddateshould change,Here Startdate and Enddate is Editbox/calander control.
    Declared the presentation variable in first prompt and in the second prompt of SQL Results(Default to) i am writing
    +SELECT CASE WHEN '@{Pres}='WEEKLY' THEN VALUEOF(VAR_WEEKLY) END+
    but in the default one it was not showing the Repository variable value...
    Please suggest me any solution its an urgent
    thanks,
    saichand.v

    Hi Saichand,
    Are you getting an error ("Error Generating Drop Down Values")? Or are you just seeing a blank default value?
    If you are getting an error, do you have any presentation columns in your default SQL formula? If not, that's your problem. OBIEE won't let you construct a logical SQL query without having a presentation column in it somewhere.
    If this is your issue, try the following: SELECT CASE WHEN 1=0 THEN <PRESENTATION_COLUMN> WHEN '@{Pres}'='WEEKLY' THEN VALUEOF(VAR_WEEKLY) END FROM <SUBJECT_AREA>
    Be sure to replace SUBJECT_AREA and PRESENTATION_COLUMN with appropriate names. The condition 1=0 will never evaluate to true, so it's as if it's not there, but OBIEE will see that there's a presentation column in the formula and stop giving you the error.
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • Using Presentation variables in Prompt Default using SQL Results.

    I have set a presentation variable in a prompt(say 1st prompt). In the 2nd prompt, using default option, when I try to reference this variable in SQL Results, I get this error.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <@>: Syntax error [nQSError: 26012] . (HY000)
    The syntax used for SQL is:
    SELECT <tab>.<col1> FROM <subject area> WHERE <tab>.<col2> = @{variables.myvar}
    Note: However the same SQL works fine in SHOW option.
    Thanks in advance..
    Edited by: user457687 on Feb 27, 2009 3:13 PM
    Edited by: user457687 on Feb 27, 2009 4:49 PM

    - OK. In the second prompt, instead of setting Default to SQL Results, set it to Specific Value.
    - Then insert '{pres_var}' in the window. I got it to work this way.
    - It supplied the PV as the default in the second prompt after hitting "Go" on the first prompt.
    Hi, thanks for your suggestion but I don't need to have the value of the presentation variable itself as the prompt default. The variable is a filter for a specific SQL clause and the default is the result of this SQL.
    Cheers
    DrPlexi

Maybe you are looking for

  • Ibooks - Problem with configuration of my iPhone. Please Restore?

    I had bought a book on my iPad today .. and I sync'd it with my iPhone so I can read it on my iPhone as well .. but when I open the book it says " There is a problem with the configuration of your iPhone. Please restore with iTunes and reinstall iBoo

  • Error when creating a new Data Source

    All, This is on BI Publisher 11g. When I create a new data source and supply password and then click "Apply" button on top right corner, i get following error Error 500--Internal Server Error From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 10.

  • Flex session replication among cluster Help needed!

    Hi, I'am using Flex 3, LiceCycle Data Service 2.5.1, JBoss 4.2.1 in a web application. Our JBoss servers are in a cluster. We want to replicate Flex session among cluster, but it doesn't work. Did someone face issue with Flex session replication amon

  • How to change my billing info to none in my app store

    How to change my billing info to none in my app store

  • How to remove fairplay from old purchased songs?

    Hello there!! As you know Apple removed DRM (Fairplay) from their songs some years ago. Is there anyway to remove Fairplay from songs bought before Apple removed the DRM? Or is possible to re-purchase without any kind of cost this old songs without F