FILL MONTHS DYNAMICALLY IN THE ITEM VIA ORACLE FORMS GROUP RECORDING LIST

Experts

I have a query in oracle forms. I need to fill Last_Month, Current_Month & Next_month based on Sys_Date in the list box. I am able to get the values in SQL if I run the query below, but when I use the version of Oracle Forms 10.1.2.0.2, I could not get the values of Mr. can you please guide me where I'm wrong.

declare

v_rg_id recordgroup: = NULL;

Number of V_errorcode;

v_rg_salmth varchar2 (30): = "MONTHS";

Begin

v_rg_id: = find_group (v_rg_salmth);

If id_null (v_rg_id) then

v_rg_id: = create_group_from_query (v_rg_salmth,

"WITH (AS MONTH_COUNTER)

SELECT LEVEL 2 AS ID

OF THE DOUBLE

CONNECT BY LEVEL = 2

UNION

SELECT LEVEL AS ID

OF THE DOUBLE

CONNECT BY LEVEL = 0

)

SELECT TO_CHAR (ADD_MONTHS (TO_CHAR (SYSDATE), ID), MONTH) AS MONTH_COUNTER MONTHS ');

v_errorcode: = populate_group (v_rg_id);

If v_errorcode = 0 then

message ("record group filled with data");

on the other

message ("V_errorcode is:" | ") v_errorcode);

end if;

End if;

populate_list('MASTER.) MONTH, v_rg_id);

end;

The rather complicated query, try

SELECT ADD_MONTHS (SYSDATE-1) TO DOUBLE

UNION ALL

SELECT SYSDATE DOUBLE

UNION ALL

SELECT THE DOUBLE ADD_MONTHS(SYSDATE,1)

BTW. to use a query to populate a list, you must select two values, a label and a value, check it fill listitems dynamically - Andreas Weiden - on Oracle

Tags: Oracle Development

Similar Questions

  • How dynamically update the role of oracle using the trigger

    How dynamically update the role of oracle using the trigger:

    I have svmanger owner of schema in the database. There are five tables belonged to svmanager.

    Table A, B, C, D, E.

    I have a role that is played only to these tables under the scheme: SVMANAGER_READ_ONLY

    now, if I create a new table F under svmanager. the role that svmanager_read_only does not work is updated, so the user had assigned role cannot access table F.

    is there a way to create the trigger for this role dynamically update any when a table is created or deleted?

    Thank you.

    I really really really don't suggest to do this - it's a bad habit. If possible I'd just adding the grant as part of the steps to the role on the new creation of the table.
    But for fun here's how you can accomplish this:

    create or replace procedure execute_grant(v_ddl in varchar2)
    is
    begin
       execute immediate v_ddl;
    end;
    /
    
    create or replace trigger catch_create_table_trg after create on schema
    DECLARE
    
    ddl_job number;
    ddl_str varchar2(50);
    begin
       IF ora_dict_obj_type = 'TABLE' THEN
    
           ddl_str := 'GRANT SELECT ON '||ora_dict_obj_owner||'.'||ora_dict_obj_name||' TO SVMANAGER_READ_ONLY';
    
           dbms_job.submit(job => ddl_job,
           what => 'execute_grant(''' || ddl_str || ''');',
           next_date => sysdate+(5/24/60/60));
    
       END IF;
    end;
    /
    

    Test it

    create table F (id number(1));
    

    Validate

    select * from ROLE_TAB_PRIVS where ROLE = 'SVMANAGER_READ_ONLY';
    
  • The components of Oracle Forms and reports refers specifically to the which components?

    Hello

    Could you help me with the following question.

    Our client uses the following documents to improve reports and forms Oracle 11 g Release 1 on Oracle Forms and reports 11g Release 2.

    http://docs.Oracle.com/CD/E38115_01/doc.111210/e23975/upgrade_from_r1.htm#BDJFHIEH
    Oracle® Fusion Middleware Upgrade Guide for Oracle Forms and reports
    11g Release 2 (11.1.2.1)
    E23975-02 part number
    Upgrade-5,3 doing the Oracle Forms and reports 11 g Release 1 (11.1.1)
    ----------cut-----------
    Ensure that the destination Oracle instance and the destination Oracle WebLogic Server domain are running.

    To verify that the instance and domain are running, log on to Oracle Enterprise Manager Fusion Middleware control for the field and make sure that the managed servers and components Oracle Forms and reports are running.
    ----------cut-----------
    On the above documents, our client has a question.

    [Question]
    The components of Oracle Forms and reports refers specifically to the which components?
    (Or need to check what components are running?)

    Please give me some advice.

    Best regards

    David

    For Windows, you can use the command line or shortcuts in Windows that are created for you.  In the case of OPMN under Windows, a Windows Service is created.  Information on the power on/off is in the documentation of the product here:

    http://docs.Oracle.com/CD/E23943_01/Web.1111/e13708/TOC.htm

    http://docs.Oracle.com/CD/E23943_01/Web.1111/e13740/starting_nodemgr.htm

  • by selecting only the time in oracle forms

    Hi all
    as a picker of oracle forms can I select the time in oracle forms in a text element.
    I want to display the time in this format 10:10:30, and I would also like to insert into the table
    I took the data type of this column as varchar2 (15) if I take date can I insert time or varchar2 is ok.
    my version of oracle forms is 10g.


    Please answer...

    Hi, extreme

    extreme wrote:
    Hi all
    as a picker of oracle forms can I select the time in oracle forms in a text element.
    I want to display the time in this format 10:10:30, and I would also like to insert into the table
    I took the data type of this column as varchar2 (15) if I take date can I insert time or varchar2 is ok.

    Better take column with the data type date. You can insert the date and time in the date field.
    You just change the forms.
    Change the data type Date to Datetime

    to view a single moment, use the format mask.

    Hope this helps

  • How can I use SQL to check the Version of Oracle Forms and object of the request?

    Hi all:

    How can I use SQL to check the Version of Oracle Forms and object of the request?





    Concerning
    Terry

    Terry,

    See the following threads/docs for the version of forms.

    How to find the developer version
    Re: How to find the developer version

    Note: 466890.1 - Script to find the Apache, Java, Jinitiator, version of forms and details of the JVM for Oracle E-Business Suite 11i
    Note: 392793.1 - how to get Forms Oracle Oracle Applications 11i Command Line Version
    Note: 468311.1 - Script to find the Apache, Java, JRE, Forms for Oracle E-Business Suite R12 version

    What purpose are you talking?

    Thank you
    Hussein

  • Call a page of the OAF of Oracle Forms

    Hello

    Is it possible to call a page of the OAF of Oracle Forms.

    Thanks in advance,
    Roselyne

    Hi Flo,

    Read Pages Executive Dev Guide to launch OA of Oracle Forms Applications.

    Thank you
    -Anil

  • How to display the rownum in oracle forms?

    Hai all,

    How to display the rownum in oracle forms?

    Thank you
    RCS
    ----------------

    I would add rowum with the current form of group_mstr:

    former columns:

    group_id
    GroupName

    new columns will be:

    identifier of the line
    group_id
    GroupName


    I created as follows:
    in forms
    text tool > row id
    text element > EXT_ITEM20

    error text element: no white color, it's a different color
    --------------

    create > Trigger > a time new form instance > I gave like this:

    DECLARE
    CURSOR crrow_id IS
    SELECT count (*) + 1 group_mstr;
    BEGIN
    OPEN crrow_id.
    Search FOR crrow_id IN: TEXT_ITEM20;
    CLOSE Crrow_id;
    END;
    ------------
    error: identifier group_mst must be declard
    ============

    I don't know also not quite what you want to display in your form. Do you want to just number the records displayed, from 1 to n?

    If so, create a text whose property 'data base element' element to the value 'no', "calculation method" formula and the formula itself: SYSTEM. " TRIGGER_RECORD, then, in each case, the registration number should be indicated.

  • The list item file (oracle form 6i)

    Hi all


    I have a problem regarding complete recording in the list item

    I have this code works in Oracle 10 g Forms Builder

    DECLARE
    REPORT NUMBER;
    Problem EXCEPTION;

    BEGIN

    -to fill the
    STATUS: = POPULATE_GROUP ('RG_PROD_DESC');

    -Make sure that the select statement is executed successfully.

    IF <>STATUS 0 THEN
    PROBLEM;
    ON THE OTHER
    -to fill the list item
    POPULATE_LIST (' DESCRIPTION ', 'RG_PROD_DESC' ");
    END IF;

    EXCEPTION
    Problem WHEN THEN
    MESSAGE ("we have a problem to query the table PRODUCT.');
    END;


    but when I try this code in Oracle Forms 6i, it did not work.


    can someone help me in this matter?

    Try this way. I changed some of the code to test on my system.

    DECLARE
    STATUS NUMBER;
    Problem EXCEPTION;
    list_id ITEM;
    BEGIN
    list_id :=Find_Item('Blockname.Listname');
    -- to populate the group
    STATUS:=POPULATE_GROUP('RG_PROD_DESC');
    -- Check that the select statement was executed successfully.
    CLEAR_LIST(list_id);
    POPULATE_LIST(list_id, 'RG_PROD_DESC');
    
    EXCEPTION
    WHEN others THEN
    MESSAGE ('We have a problem to query the PRODUCT table.');
    END;
    

    Best regards
    Franck Giri

  • How to find the error in oracle forms

    Dear gurus,

    I am newbie in oracle forms. I have a form with many items. In this regard, certain elements are not met. These elements are filled from four different cursors depending on certain conditions. for example,.
    IF <condtion1> true then
     open cursor1;
       populate all the items  from cursor1 columns
    elsif <condition2>true then
       open cursor2;
        populate all the items  from cursor2 columns
    elsif<condtion3>true then
        open cursor3;
       populate all items  from curso3r  columns
    elsif<condtion4>true then
        open cursor4;
       populate all items  from cursor4  columns
    This cursors are written to the database level.
    Now, I want to know what slider elements become values.

    My TL told me to find this, put messages. But I don't know where I put message [or in forms or cursors?]. Is an easy way to find errors in its present form?

    Thank you all.

    My TL told me to find this, put messages. But I don't know where I put message [or in forms or cursors?].

    You can add messages to your forms code in your conditional statement. For example, using your code sample:

    IF  true then
     open cursor1;
       Clear_Message;
       Message('Using Cursor 1');
       Message(' ');
       populate all the items  from cursor1 columns
    elsif true then
       Clear_Message;
       Message('Using Cursor 2');
       Message(' ');
       open cursor2;
       populate all the items  from cursor2 columns
    elsiftrue then
       Clear_Message;
       Message('Using Cursor 3');
       Message(' ');
       open cursor3;
       populate all items  from curso3r  columns
    elsiftrue then
       Clear_Message;
       Message('Using Cursor 4');
       Message(' ');
       open cursor4;
       populate all items  from cursor4  columns
    

    If your form works and you troubleshoot just a mistake, I wouldn't recommend restructure you your form. If the current process is inefficient or not, it has been tested and proved to a certain extent. Unless the form has many problems, I would keep the way it is and just solve the problem at hand! :)

    Is an easy way to find errors in its present form?

    You don't mention your version of Oracle Forms, but rather than adding messages to the code; I recommend that you use the debugger to step through your code forms so that you can see the enforcement code that is causing the problem. (Note: the debugger of forms can only step through you the code in the form.) If your cursors are in a data base/package procedure - all you will see is the call of this procedure of database/package - not the code in the procedure/package).

    If you are using Forms 6i, simply add the "break." part of the code you want to debug. If you use Forms 9i or higher, then you will need to be able to run your form from forms manufacturer; which requires a configuration to make it work. Once configured, simply select the line you want to break the and press F5 for enabled or disabled a breakpoint. Then run your form by using the option 'run Debug form '.

    If you really want to reegineer your form to use a query in the From Clause, take a look to forms: how - a block based on a query FROM Clause for more information on the query from Clause.

    Now, I want to know what slider elements become values. The link Christian listed is also a very good article on using queries in the From Clause.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • Connect to the database using oracle forms

    Hello experts,

    I have installed on my computer, Oracle Developer Suite 10 g (10.1.2.0.2) (including the forms and Designer) and after that I installed Oracle Database 11 g Express Edition (11.2) Beta.
    both facilities are on the same (local) computer.
    When I chose to connect to the database, he wonder about the data connection to the database:
    username, password and database.
    I'm sure that the user name and password are correct, because I have no problem to connect directly to the database (via sql * more).
    could you please tell me what I should write in the field database? I trid XE but it dose not help.
    Can I need to make some changes manully so that it works?
    Please note that the operating system is Windows XP service pack 3.

    Thank you for your help.

    Published by: user1818173 on 28/08/2011 01:43

    Hello
    Have you changed the TNSNAMES file. File of the ORA for DS? You must add the TNS for DS TNSNAMES. ORA file.
    Go to $DB_Default_Home$ \netword\admin and open the TNSNAMES file. ORA file in Notepad. Copy the entry tns where you connect from SQL * more.
    Go to $DS_Default_Home$ \netword\admin and open the TNSNAMES file. ORA file in Notepad. Paste the tns entry that you copied.
    Now try to connect generator of form.
    Kind regards
    Qasim Jules

  • Dynamically change the attributes of HTML form elements

    I have a form region that contains the elements, some attributes of the HTML Form readonly = 'true '.

    It is possible to dynamically set these so I can enable / disable read only to the level element is based on a function PL/SQL (or other method).


    Thanks in advance.

    A bit of Javascript can do for you.

    Put this function JS in the header HTML of the page

    
    

    And then define a process of "after a footer" which returns the items to read only according to the conditions you decide

    if pl_sql_function_to_determine_RO ('') then
       htp.script('setReadOnly(""');
    end if;
    ....... repeat for other items
    
  • Unable to connect to the database from Oracle Forms server

    Hello

    I installed Oracle Forms on top of Weblogic server. When I try to connect to an Oracle Forms home by TNS naming database, it returns error "ORA-12504". It works fine when I use EZConnect.

    D:\Oracle\Middleware\FRHome\BIN >. \sqlplus myuser/mypass@auhdb2

    SQL * more: version 11.1.0.7.0 - Production on Sun Sep 28 10:28:34 2014

    Copyright (c) 1982, 2008, Oracle.  All rights reserved.

    ERROR:

    ORA-12504: TNS:listener did not have the SERVICE_NAME in CONNECT_DATA

    D:\Oracle\Middleware\FRHome\BIN > @//auhdb2/auhdb2 mypass/myuser mypasssqlplus

    SQL * more: version 11.1.0.7.0 - Production on Sun Sep 28 10:28:55 2014

    Copyright (c) 1982, 2008, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    SQL >

    Here are the specifications of the environment:

    Server operating system: Windows 2008 R2 64-bit EA

    WebLogic: Weblogic Version 10.3.6

    Forms and reports: 11.1.2.2

    Database, I am trying to connect to: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 on Windows 2003 Server

    Tnsnames configuration in D:\Oracle\Middleware\FRHome\network\admin:

    AUHDB2 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = auhdb2) (PORT = 1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = auhdb2)

    )

    )

    Thanks in advance.

    I want to update this post because I understood what was the matter.

    The TNSNAMES file. ORA file must be created in ORACLE_INSTANCE/config, not in %ORACLE_HOME%\FRHome\network\admin

    It was interesting for me!

  • more than 50 main menu are not not in the next row, oracle forms version 10.1.2.0.2

    Dear Sir.

    I use the ORACLE forms 10.1.2.0.2 version, it is possible in this version that more horizontally online next menu top 50 show currently in the horizontal scroll bar in oracle forms menu, but in this show of forms 6.0.8.11.3 oracle version of the main menu in the following line

    Mukesh Nandan

    What was wrong with the anser you got in your first thread?

    Hello

    see you soon

  • Point of the box in oracle forms

    Hello experts, I am new in oracle forms. I use oracle weblogic server 10.3.5, oracle database 11 g on windows 7, 11 platform g. I have a simple table.there basic data block is a tabular shape is selected, it has four rows (records). Now I have to block the 4 adjacent boxes to data records in another block of data. Now, I have to feature in which that records must be inserted to the table of database for which corresponding checkbox (in front of registration) is checked. Thank you cordially Abdellatif.

    Hello

    Commit_Form built-in function commits all available database fields.  Therefore, use separate Insert in the statement to accomplish your task.

    As...

    because me in 1... 4

    loop

    premier_enregistrement;

    If: chk_box = 'Y' then

    Insert into values(field1,field2,...);

    end if;

    next_record;

    end loop;

  • Create the hyperlink in oracle Forms

    Hi all

    I want to show a hyper link on my form(forms_6i).i have used.web.showdocument (url, '_blank')
    its fine for the web URL.but my requirement to have the hyper link to the file stored in LAN in the field on the part of work.

    Is it possible to do with oracle forms 6i and e-Business suite.

    Thank you
    Bharat

    Bharat,

    But to open the path of local network I should use \\192.168.1.203\ like that then EUL.

    There is no way to do it. ? >
    As you say here, it's a network , not a URL path. The WEB. ShowDocument integrated expects a URL so everything that you pass to this built-in function will be treated as a URL. Rather than use the UNC format, try using the URL to open a file from a browser instead (for example: file://192.168.1.200/test/hi).

    You can test it in your browser quite easily to confirm that it works. Then pass the url of the Web file. ShowDocument instead of the network address.

    Craig...

Maybe you are looking for