Oracle Forms auto add employees on the next row










0















I have a table like this:



+------------+
| EMP_CODE |
+------------+
|CODEA |
|CODEA1 |
|CODEA2 |
|CODEB |
|CODEC |
|CODEC2 |
|CODED |
|CODED1 |
|CODEE |
|CODEE1 |
|CODEE2 |
+------------+


My multi-row block in forms:



enter image description here



What I wanted is if I add for example the EMP_CODE CODEE, it will automatically add EMP_CODE(s) with CODEE on the next row and so on. Like this:



enter image description here



Just tell me if I missed out something or if there's something unclear on my explanation. Thank you!










share|improve this question






















  • How does CODEE relate to CODEE1 and CODEE2?

    – Jåcob
    Nov 14 '18 at 9:25











  • they both have, let's say, the same root code CODEE

    – Miracle
    Nov 14 '18 at 9:37












  • If it does have, then you could populate onto the read-only columns by executing a query in the KEY_NEXT_ITEM trigger.

    – Jåcob
    Nov 14 '18 at 10:10











  • it is not read-only

    – Miracle
    Nov 15 '18 at 6:11






  • 1





    It doesn't have to be read-only, the rationale to mention is because CODEE1 and CODEE2 are automatically populated as specifies in the question.

    – Jåcob
    Nov 15 '18 at 6:20















0















I have a table like this:



+------------+
| EMP_CODE |
+------------+
|CODEA |
|CODEA1 |
|CODEA2 |
|CODEB |
|CODEC |
|CODEC2 |
|CODED |
|CODED1 |
|CODEE |
|CODEE1 |
|CODEE2 |
+------------+


My multi-row block in forms:



enter image description here



What I wanted is if I add for example the EMP_CODE CODEE, it will automatically add EMP_CODE(s) with CODEE on the next row and so on. Like this:



enter image description here



Just tell me if I missed out something or if there's something unclear on my explanation. Thank you!










share|improve this question






















  • How does CODEE relate to CODEE1 and CODEE2?

    – Jåcob
    Nov 14 '18 at 9:25











  • they both have, let's say, the same root code CODEE

    – Miracle
    Nov 14 '18 at 9:37












  • If it does have, then you could populate onto the read-only columns by executing a query in the KEY_NEXT_ITEM trigger.

    – Jåcob
    Nov 14 '18 at 10:10











  • it is not read-only

    – Miracle
    Nov 15 '18 at 6:11






  • 1





    It doesn't have to be read-only, the rationale to mention is because CODEE1 and CODEE2 are automatically populated as specifies in the question.

    – Jåcob
    Nov 15 '18 at 6:20













0












0








0








I have a table like this:



+------------+
| EMP_CODE |
+------------+
|CODEA |
|CODEA1 |
|CODEA2 |
|CODEB |
|CODEC |
|CODEC2 |
|CODED |
|CODED1 |
|CODEE |
|CODEE1 |
|CODEE2 |
+------------+


My multi-row block in forms:



enter image description here



What I wanted is if I add for example the EMP_CODE CODEE, it will automatically add EMP_CODE(s) with CODEE on the next row and so on. Like this:



enter image description here



Just tell me if I missed out something or if there's something unclear on my explanation. Thank you!










share|improve this question














I have a table like this:



+------------+
| EMP_CODE |
+------------+
|CODEA |
|CODEA1 |
|CODEA2 |
|CODEB |
|CODEC |
|CODEC2 |
|CODED |
|CODED1 |
|CODEE |
|CODEE1 |
|CODEE2 |
+------------+


My multi-row block in forms:



enter image description here



What I wanted is if I add for example the EMP_CODE CODEE, it will automatically add EMP_CODE(s) with CODEE on the next row and so on. Like this:



enter image description here



Just tell me if I missed out something or if there's something unclear on my explanation. Thank you!







oracle oracleforms






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 '18 at 8:10









MiracleMiracle

229121




229121












  • How does CODEE relate to CODEE1 and CODEE2?

    – Jåcob
    Nov 14 '18 at 9:25











  • they both have, let's say, the same root code CODEE

    – Miracle
    Nov 14 '18 at 9:37












  • If it does have, then you could populate onto the read-only columns by executing a query in the KEY_NEXT_ITEM trigger.

    – Jåcob
    Nov 14 '18 at 10:10











  • it is not read-only

    – Miracle
    Nov 15 '18 at 6:11






  • 1





    It doesn't have to be read-only, the rationale to mention is because CODEE1 and CODEE2 are automatically populated as specifies in the question.

    – Jåcob
    Nov 15 '18 at 6:20

















  • How does CODEE relate to CODEE1 and CODEE2?

    – Jåcob
    Nov 14 '18 at 9:25











  • they both have, let's say, the same root code CODEE

    – Miracle
    Nov 14 '18 at 9:37












  • If it does have, then you could populate onto the read-only columns by executing a query in the KEY_NEXT_ITEM trigger.

    – Jåcob
    Nov 14 '18 at 10:10











  • it is not read-only

    – Miracle
    Nov 15 '18 at 6:11






  • 1





    It doesn't have to be read-only, the rationale to mention is because CODEE1 and CODEE2 are automatically populated as specifies in the question.

    – Jåcob
    Nov 15 '18 at 6:20
















How does CODEE relate to CODEE1 and CODEE2?

– Jåcob
Nov 14 '18 at 9:25





How does CODEE relate to CODEE1 and CODEE2?

– Jåcob
Nov 14 '18 at 9:25













they both have, let's say, the same root code CODEE

– Miracle
Nov 14 '18 at 9:37






they both have, let's say, the same root code CODEE

– Miracle
Nov 14 '18 at 9:37














If it does have, then you could populate onto the read-only columns by executing a query in the KEY_NEXT_ITEM trigger.

– Jåcob
Nov 14 '18 at 10:10





If it does have, then you could populate onto the read-only columns by executing a query in the KEY_NEXT_ITEM trigger.

– Jåcob
Nov 14 '18 at 10:10













it is not read-only

– Miracle
Nov 15 '18 at 6:11





it is not read-only

– Miracle
Nov 15 '18 at 6:11




1




1





It doesn't have to be read-only, the rationale to mention is because CODEE1 and CODEE2 are automatically populated as specifies in the question.

– Jåcob
Nov 15 '18 at 6:20





It doesn't have to be read-only, the rationale to mention is because CODEE1 and CODEE2 are automatically populated as specifies in the question.

– Jåcob
Nov 15 '18 at 6:20












1 Answer
1






active

oldest

votes


















1














Will try to explain one approach, perhaps there would be better ways to achieve the desired functionality.



The below is pseudo code, improvise and change as per your request.



KEY-NEXT-ITEM

BEGIN
SELECT emp INTO :your_block_name.column_name
FROM table_name
WHERE column_name = :block_name.emp;
EXCEPTION
WHEN OTHERS THEN
// consider raising or do as per logic
END;


Having answered this, I believe the table design is not correct for which perhaps instigate a separate discussion to dissect.






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53295595%2foracle-forms-auto-add-employees-on-the-next-row%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Will try to explain one approach, perhaps there would be better ways to achieve the desired functionality.



    The below is pseudo code, improvise and change as per your request.



    KEY-NEXT-ITEM

    BEGIN
    SELECT emp INTO :your_block_name.column_name
    FROM table_name
    WHERE column_name = :block_name.emp;
    EXCEPTION
    WHEN OTHERS THEN
    // consider raising or do as per logic
    END;


    Having answered this, I believe the table design is not correct for which perhaps instigate a separate discussion to dissect.






    share|improve this answer





























      1














      Will try to explain one approach, perhaps there would be better ways to achieve the desired functionality.



      The below is pseudo code, improvise and change as per your request.



      KEY-NEXT-ITEM

      BEGIN
      SELECT emp INTO :your_block_name.column_name
      FROM table_name
      WHERE column_name = :block_name.emp;
      EXCEPTION
      WHEN OTHERS THEN
      // consider raising or do as per logic
      END;


      Having answered this, I believe the table design is not correct for which perhaps instigate a separate discussion to dissect.






      share|improve this answer



























        1












        1








        1







        Will try to explain one approach, perhaps there would be better ways to achieve the desired functionality.



        The below is pseudo code, improvise and change as per your request.



        KEY-NEXT-ITEM

        BEGIN
        SELECT emp INTO :your_block_name.column_name
        FROM table_name
        WHERE column_name = :block_name.emp;
        EXCEPTION
        WHEN OTHERS THEN
        // consider raising or do as per logic
        END;


        Having answered this, I believe the table design is not correct for which perhaps instigate a separate discussion to dissect.






        share|improve this answer















        Will try to explain one approach, perhaps there would be better ways to achieve the desired functionality.



        The below is pseudo code, improvise and change as per your request.



        KEY-NEXT-ITEM

        BEGIN
        SELECT emp INTO :your_block_name.column_name
        FROM table_name
        WHERE column_name = :block_name.emp;
        EXCEPTION
        WHEN OTHERS THEN
        // consider raising or do as per logic
        END;


        Having answered this, I believe the table design is not correct for which perhaps instigate a separate discussion to dissect.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 15 '18 at 11:29

























        answered Nov 15 '18 at 7:10









        JåcobJåcob

        8,17045157266




        8,17045157266



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53295595%2foracle-forms-auto-add-employees-on-the-next-row%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            ReactJS Fetched API data displays live - need Data displayed static

            政党