How To? Select List item return 2 values (high and a low)

Can anyone suggest how to make a select list drop box return 2 values for my query.
eg:
Pick from
Last Week
Last Month
Last Year
return high/lo values of
5-feb-06 12-feb-06
01-jan-06 31-jan-06
01-jan-05 31-dec-06
Such that my query can refer to it as
select *
from tabx
where dte > :parm_lo
and dte < :parm_hi
You get the idea ..

I haven't tested this at all, so it may not work, but the first thing that springs to mind is not returning the two dates, base it on the current date, i.e. have your select list return something like -
Last Week - Return 'W'
Last Month - Return 'M'
Last Year - Return 'Y'
then use a query something like -
SELECT *
  FROM tabx
WHERE dte >
          CASE v ('ITEM')
             WHEN 'W'
                THEN TRUNC (SYSDATE, 'd')
             WHEN 'M'
                THEN TRUNC (SYSDATE, 'Mon')
             WHEN 'Y'
                THEN TRUNC (SYSDATE, 'yyyy')
             ELSE dte - 1
          ENDLike I said, completely untested and may not work...you may also have to play around with the boundary values (NLS settings too perhaps).

Similar Messages

  • Multiple Select List not returning multiple values

    I have created a Multiple Select List, and the manual says that when multiple values are selected and the page is submmitted (I'm using a GO button), the multiple values are put into the ITEM field, separated with a colon . However, whenever I select multiple entries in my list, it only ever returns a value for the first item (like a single select list).
    Does anybody know what I may have missed ? I'm still fairly new to this stuff, so I'm hoping it's fairly simple!
    thanks.
    p.s I'm using a dynamic list of values.

    Andy / Scott,
    Sorry, please bear with me ... still new to this.
    I have a multi select list item in page 2, called P2_MULTI_LIST. When the page is submitted, I no longer physically pass it to page 3, but how would page 3 pick up the value ? Do I need to set up a P3_MULTI_LIST item in page3 and set that item to the P2_MULTI_LIST value, or do I reference P2_MULTI_LIST directly in my Page3 SQL query ?
    Also, if I then want to propogate the value in P2_MULTI_LIST down to another page from page3, via a link in a report, is this possible ?
    thanks
    Tim

  • How to refresh list item values before report is run?

    We have two SELECT LIST items (drop boxes) on our report. One SELECT LIST has values of "World Region" (e.g. NORTH AMERICA, SOUTH AMERICA, EUROPE, ASIA)
    the other SELECT LIST has values of "Subregion" (e.g. NORTHERN EUROPE, SOUTHERN EUROPE, SOUTHEAST ASIA etc...)
    The values in the Subregion list are dependent on the value that is chosen from the "World Region" List. Can someone tell up how to update the values in the Subregion list BEFORE we submit the page? We can get these values to update (via sql query) when the page is submitted but that is only happening after the report gets run- which is not what we want. We want the user to select a Region from one SELECT LIST and then see all the qualifying Subregions for that Region in the Subregion SELECT LIST. Only after both Region and Subregion have been selected do we want to run the report. Thank for any help on this.

    hey john--
    john) things like Scott's reference to "The name of the LOV Item". What does this really mean?
    raj) in htmldb there's a concept of items at the page and at the app level. page level items have ui component associated with them. in scott's explanation above, he's talking about using a page-level item with a "Display as" type of "select list w/submit" for your first select list. in that case, he's suggesting you have one select list item drive the values of another. when the self-submitting select list submits the page, it sets an htmldb built-in variable called :REQUEST to the name of the self-submitting select list item. in your follow-up post's example, that'd be "REGION_LIST". scott was explaining how you could control the functionality on your page by adding conditions to things like...
    :REQUEST = 'REGION_LIST'
    ...or using declarative Condition options like "Request = Expression 1" and then putting the string "REGION_LIST" in that Expression1 field. so in your case, you have a report region that you don't want displayed until the user's done selecting from your Subregion list. an easy way to handle that would be to add a hidden item (where "Display as" is set to "Hidden") to your page, for example :P1_LAST_REQUEST, to store the last value of :REQUEST. put a Computation on your page that populates :P1_LAST_REQUEST with :REQUEST each time the page is submitted. then put a Condition on your report region that makes it only render when :P1_LAST_REQUEST != 'REGION_LIST'. so this way your users can select a Region and have the page submit itself. the page will then redraw with the values of subregion list correctly populated (you'd presumably use :REGION_LIST in your subregion LOV query to achieve the filtered values) w/o your report region displayed. the user would then select a correct subregion and click some sort of "run my report" button. this time when the page redraws, :P1_LAST_REQUEST would be set so something other than "REGION_LIST" (it'd be set to whatever you named your "run my report button") and so your report region would display as desired.
    hope this helps,
    raj

  • Select List not returning return_value

    Greetings
    I have a field on a page that is Display As: Select List.
    My list of values definition, (as generated by the Create Dynamic List of Values wizard)
    select DNAME display_value, DEPTNO return_value
    from DEPT
    order by 1
    When I run my page and select from the select list it returns the value of dname rather than deptno.
    Am I missing something, because of the format of the list of values definition I was expecting the return value of deptno.
    If I change my display type to PopupLOV, the return value is the deptno, so why is it that the select list is not returning deptno?
    Any help is appreciated
    Regards
    Mark

    Jeff,
    I read Mark's statement as saying:
    Select "Accounting" from select list
    Value returned displays "Accounting"
    Value stored in the database is "Accounting"
    which seems very odd. Whenever I've used these, it displays Accounting but the item value becomes "10".
    Good luck Mark!
    Stew

  • How to make a select list to return value to numeric column?

    I do have a select list with static values (STATIC:01;0,02;1,03;2,04;3,05;4,06;5,07;6,08;7,09;8,10;9). The problem is that I am returning a value to a numeric column. Therefore I have set 'Post Calculation Computation' as "to_number(:P73_MRGRATING, 9);" however I am getting ORA-01722: invalid number. How, (or when and where) to properly convert a character from a select list representing a numeric value into column of NUMBER data type?
    Thank you for your time.
    DanieD

    Sergio,
    It is because I am not able convert a value in a page item (:P73_ID) to number. On a page before, I have assigned a value to an application item (APPL_ID). On page 73, I want to assign the value in APPL_ID to the page item P73_ID . The value assigned to APP_ID is numeric. On a page 73 I also have a computation in Page processing section. It is an 'After Submit' processing of a static assignment of application item APPL_ID to page item P73_ID. Unfortunately it does not work. (ORA-01722: invalid number). I have tested this also with a 'Post Calculation Computation' on page item P73_ID (to_number(:P73_ID, 9999999999);) and I am still getting ORA... error. Only way I can make it work is to create a page item P73_ID as a text field, then when I run page 73 and enter a value into P73_ID manually - then it works and I can save the values from the form into database...
    The strange thing is that I am using application item APPL_ID on a couple of pages, in where clauses and it always works, even when I am comparing APPL_ID against a numeric value like select * from a_table where some_number = :APPL_ID, this works. But when I would like to create an entry form and assign application item APPL_ID to the page item P73_ID that is referencing a numeric table column – then I am getting ORA-01722…
    Is there any application (sample application) that is doing this and it works so I can check it and learn how to create this process appropriately?
    Thank you for your time.
    DanielD

  • Set Default Value of Multi-select list item

    I have a multi-select list item I want to default the value of to '%' (which is really '%null%') and have it selected. I tried setting default value of item, but it doesn't take '%null%'. I also tried a computation with a static of
    :P507_ITEM := '%null%'; How do you get the default value set and selected?

    Hi
    Shijesh is right, you need to change your null return value and use that return value as your default. Try and use something of the same datatype as your real return values if you plan to use '%' to display all as it will make your queries simpler. eg.
    Company A returns 1
    Company B return 2
    % returns 0
    Then your query would be...
    SELECT ...
    FROM ...
    WHERE company_id = DECODE(:P_COMPANY,1,1,2,2,0,company_id)
    Hope this makes sense.
    Cheers
    Ben

  • Increase value of Select List Item with a Button

    Hi all,
    I've got an apex appli which is working well.
    In one report page I use a select list with a LOV, but I want to "enhance" this functionality:
    I need a kind of button which increments the item-value of the select list by 1,
    so that the user can easily skip to the next value of the LOV without scrolling thru the select list.
    Unfortunately I dont't get it working. Has anyone an idea how to realize that?
    thanks in advance
    Frank

    Hello Frank,
    Assuming your select list item is called P1_SELECT, you can define an HTML button, next to the item, that will do the trick.
    In the Post Element Text field of P1_SELECT, you can have similar code to the following:
      <input type="button" value="Next Value" onclick="$x('P1_SELECT').selectedIndex+=1;" />Hope this helps,
    Arie.

  • Want 2 populate value in 2nd list item based on value selected in 1st list?

    Want 2 populate value in 2nd list item based on value selected in 1st list?

    Gaurav -
    The 3rd list will not populate because nothing has been selected yet in list 2. The value in list 2 is null, so the loop to populate list (3) has nothing to load. Try the following below. This should seed your 2nd list so the 3rd list will populate.
    You will have to declare first_record boolean and first_value to match DESCC.
    first_record := true; -- NEW *****
    Clear_List('BLOCK2.ITEM2');
    FOR CurRec IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.IDD = :BLOCK2.ITEM1)
    LOOP
    if first_record = true then -- NEW SECTION *****
    first_value := CurRec.DESCC;
    first_record := false;
    end if;
    Add_List_Element('BLOCK2.ITEM2',1,CurRec.DESCC,CurRec.DESCC);
    END LOOP;
    :block2.item2 := first_value; -- NEW *****
    Clear_List('BLOCK2.ITEM3');
    FOR CurRec2 IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.DESCC = :BLOCK2.ITEM2)
    LOOP
    Add_List_Element('BLOCK2.ITEM3',2,CurRec2.DESCC,CurRec2.DESCC);
    END LOOP;
    My name is Ken, 1990 is when I started using Oracle Forms 3.0, character based in the Unix environments. And you are very welcome.

  • InfoPath: Cascading Fields, need to get ID of final selected list item

    I have a two drop down lists in an InfoPath form. They are getting their data from a SharePoint List that has two columns: Objectives, Strategies.
    The drop down lists are cascading. So dropdown list 2 (DDL2) values change depending on what dropdown list 1 (DDL1) is set to.
    So my list looks like this:
    objective 1 - strategy 1
    objective 1 - strategy 2
    objective 1 - strategy 3
    objective 2 - strategy 1
    objective 2 - strategy 2
    The cascading part in InfoPath works correctly. My problem is that I need to get the ID of the item (strategy) selected in DDL2.
    DDL1 gets its values from an external data source (sharePoint list):
    Entries: /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW
    Value: d:Objective
    Display name: d:Objective
    DDL2 gets its values from the same external data source (sharePoint list):
    Entries: /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Strategies[../d:Objective = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:obj]
    Strategy is filtered based on Objective = Objective
    Value: Strategies
    Display name: Strategies
    How can I get the ID of the Strategy selected in DDL2 so that I can write it out to another column that SharePoint can use in a workflow. The only value returned in for DDL2 is Strategy, no ID option.

    Hi Sonners,
    If you want to get the ID of the selected "Strategy" item in DDL2, I think you may need to use the same approach to retrieve the same external data source(SharePoint list have the Objectives and Strategies columns) on another field, then
    filter the list item ID based on the selected Strategy value in DDL2 which equals to the strategy value in that external SharePoint list.
    Or you don't need to get the list item ID of the "Strategy" selected in DDL2 in InfoPath form, you can directly get the list item ID which is filtered by the condition SharePoint list item "Strategy" column value equals
    to the value selected in DDL2 in Desinger workflow, then use the ID value as you want in workflow.
    I have tried a similar method for another requirement like this
    post, you can take a look.
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Improper casting of bind in select list item?

    Hi all,
    In v3.1.2, I have a Select List item called P1_DEPT_FILTER where the LOV is:
    Number of Columns          1
    Display Null                Yes
    Null display value           -- ALL --
    Null return value
    List of values definition     select DNAME, DEPTNO from DEPT order by 1
    In a computation of another item on the same page, I have a SQL Query in the computation that contains a WHERE clause referencing the Select List item:
         AND (:P1_DEPT_FILTER IS NULL OR assigned_belt LIKE :P1_DEPT_FILTER)
    The problem is that sometimes the computation query returns no rows. Using APEX debug and also dumping the session variables shows P1_DEPT_FILTER to contain the expected value based on what I selected, so I created a LOGON TRIGGER on the owner's database for the owner's schema to fire up a SQL Trace with binds. The bind variables for the computation query show "dty=1", which is a (n)varchar2 type, instead of the expected "dty=2".
    My theory is that this improper casting is causing the computation to not work correctly, since running the computation query outside of APEX works perfectly.
    I'm missing something here, but am stuck on where to continue troubleshooting. Thoughts?
    TIA!
    Rich
    Edited by: socpres on Dec 17, 2008 4:02 PM (typo)

    Hey Scott,
    My apologies for not posting the exact SQLin my original post -- I tend toward obfuscation. In any case...
    That computation and it's slight derivatives appear on computations for P3_ID, P3_ID_NEXT, and P3_ID_PREV, as well as the "Get Next or Previous Primary Key Value" process. Since the value returned for the P3_CHAMPION_FILTER Select List is "8" when I attempt to filter, I altered the P3_CHAMPION_FILTER for each of the 4 SQLs similar to this:
    SELECT
        NVL(MIN(ID),0)
    FROM
        vip_project.project_table
    WHERE
        project_document IS NULL
        AND lead_team_charter_date IS NOT NULL
        AND (NVL(:P3_BELT_FILTER,0) = 0 OR assigned_belt = TO_NUMBER(:P3_BELT_FILTER))
    --     AND (NVL(:P3_CHAMPION_FILTER,0) = 0 OR assigned_champion = TO_NUMBER(:P3_CHAMPION_FILTER))
        AND (NVL(:P3_CHAMPION_FILTER,0) = 0 OR assigned_champion = 8)And it works perfectly! Without a filter on Champion, the correct 56 rows meeting the criteria are available for navigation on the form. If I select the item in the P3_CHAMPION_FILTER that corresponds to the value of "8", only the 3 rows for that "champion" column are navigable. Here's what debug says about the P3_CHAMPION_FILTER field when I select the "8" item:
    0.14: ...Session State: Saved Item "P3_BELT_FILTER" New Value="0"
    0.14: ...Session State: Saved Item "P3_CHAMPION_FILTER" New Value="8"
    0.14: ...Session State: Save "P3_ID" - saving same value: "1"
    And the Session State:
    100     3     P3_CHAMPION_FILTER     Select List     8     I
    So, in theory, changing the "TO_NUMBER(:P3_CHAMPION_FILTER)" to "8" should have no effect, but it does. Baffling!
    Thanks!
    Rich

  • Please tell me how to handle list item in this concern

    please tell me how to handle list item in this concern
    My problem is:
    i have a category table with column categoryname(varchar type)
    I want to display the records of categoryname in a drop down list (i.e., list item )
    So ..please tell me how to do it
    Thanks in advance..

    This code is just a sample from the Help documentation. It won't work until you modify it for your form.
    Why do you have "steps" in your code? You are suppose to do what the steps tell you. You don't place the steps in your code. The steps must be removed from your code.
    Step 1 code goes in a program unit, not in a trigger.
    Step 2 and 3 code usually goes in a trigger.
    You will have to replace the names of the items and record group with your own names as you have defined them in your form.
    step 1: create a procedure in your application
    procedure load_list(itm in VARCHAR2, rg in VARCHAR2) is
    group_id RecordGroup := Find_Group(rg);
    list_id Item := Find_Item(itm);
    Begin
    if Populate_Group(group_id)<>0 then
    Message('Unable to populate record group');
    Raise Form_Trigger_Failure;
    end if;
    Clear_List(list_id);
    Populate_list(list_id, group_id);
    end;
    step 2: create a record group named rg_cat and assign Record Group Query to something like "select categoryname from category"
    step 3: call this procedure as
    load_list('categoryname','rg_cat');

  • Webpart - Get selected list items

    All,
    I have a SharePoint list and a webpart located above it. In the webpart, I have a button. Is there a way to know the selected list items when user clicks on the button?
    For example, I have a Company list which contains Company A, B, C, and D. User has selected Company A and D. When user clicks on the button of the webpart, could the webpart know that Company A and D has been selected?
    Thanks,

    check this
    http://social.msdn.microsoft.com/Forums/en-US/699166b1-9d98-44bd-b07c-2c508215a11a/how-to-get-the-selectedchecked-list-item-id-in-list-item-view-webpart-using-jquery?forum=sharepointcustomizationprevious
    http://social.msdn.microsoft.com/Forums/en-US/3d15fd44-adb1-4b51-a56e-6811220e5a60/how-to-get-the-selected-item-of-a-sharepoint-list-?forum=sharepointdevelopmentlegacy

  • Dynamic Select List Item

    Hi all,
    I want to change from a Text Field to a Select List item.
    The list items should consist of 'Buyer' from a Linked_table in another Db.
    Do I have to create a LOV (List of Value) or can I do it in another way?
    //Lasse

    Edit the item and change the Display As value from Text Field to Select List.
    Then scroll down to the List of Values region and enter your query. Something like:
        select buyer_name, buyer_id
        from buyerThere is no need to create an LOV unless you plan on using the query in multiple forms.

  • How to select an item in combo box...!

    How to select an item in combo box in order to appear in a box of text (programmed in VB.Net for SAP Business One).

    Hi Carlos,
    I am not sure if this is what you want, but here's an example of selecting a value in a combo box. This is the item master data window and I'm changing Item Type to Labor.
            Dim oCombo As SAPbouiCOM.ComboBox
            Dim oForm As SAPbouiCOM.Form
            oForm = oApplication.Forms.ActiveForm
            oCombo = oForm.Items.Item("214").Specific
            oCombo.Select("L", SAPbouiCOM.BoSearchKey.psk_ByValue)
    Hope it helps,
    Adele

  • Help with select list item and dynamics action

    G'Day Apex Gurus,
    I having problems trying to achieve to trigger the help window of a select item automatically. A help window is triggered when the select item label is clicked but my client would like to be triguered automatically as soon as the user click to see the options in the select list.
    I think that I should be able to do it with dynamic actions but I can not get it to work.
    I know when someone click on the label of the select list item trigger this JavaScript
    javascript:popupFieldHelp('277938589795252851','1545903379570909')
    So I want to trigger the javascript also when the user click of the select list item and pull down the options and for that I think that Dynamic actions is the way to go but I can't get it right.
    This is what I a doing:
    I created a Dynamic option as follow:
    Name : test
    Sequence: 30
    Even: Click
    Selection type: Item(s)
    Item(s): P1_RATING <- a selection list item
    Condtion: - No Condition -
    True Actions
    Sequence: 10
    Action : Execute JavaScript Code
    Fire when event result is :True
    Fire on page load: ticked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')
    I appreciate any one who can tell me what i am doing wrong here or provide a solution to my problem of achieving to trigger the help window of a select item automatically.
    Kind regards
    Carlos

    Hi Carlos,
    I set up a test case in exactly the same way and it worked fine for me. I created a page item called P1_DA_DEMO and added some static select list values then added some help text. The settings I used are below, I suggest you try again but also make sure you have no other Javascript errors on the page. Use a tool like firebug to check.
    Name : Dynamic Action Demo
    Sequence: 10
    Even: Click
    Selection type: Item(s)
    Item(s): P1_DA_DEMO <- a selection list item
    Condtion: - No Condition -
    True Actions
    Sequence: 10
    Action : Execute JavaScript Code
    Fire when event result is :True
    Fire on page load: Not Ticked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')
    Event Scope set a s Bind.
    Thanks
    Paul

Maybe you are looking for

  • How to print the selection screen variant as a report header

    I want to print the variant selected on the selection screen as a report header in the report painter.....Kindly help....The variant selected prior to generating the report painter output must be displayed on the final output screen as the header on

  • Clearing control and Automatic clearing

    Hello, 1.Why Automatic clearing(Business Transactions) is different from Clearing Control? 2.How Automatic clearing is linked to the Contract account? 3.Is it possible to mention both automatic clearing control and clearing control at two different f

  • I had a visit from General Error

    Not an army guy in uniform but a very 'uninformative' error message when doing media management. After 20 mins of creating files etc FCP 7 just stopped with this error "general error" message. So what was it telling me? "Sorry, computer says 'NO' so

  • My old sync account is not working on "forgot my password link", how do i recover my account?

    hello 2 mins ago i reset my fire fox because i had some useless Add-ons on my fire fox, before reset i had my sync account on fire fox 34 v. after reset now i can't use my account because i forgot my password, i used this link: https://account.servic

  • Error deploying BC4J to OC4J as EJB.

    In order to understand better the correct deploying procedure I created a small scott/tiger BC4J project. Then I created an EJB deploy using the wizard and deployed it to a fresh O4JC install. During deploy I receive an "error loading class ....Datab