Sign Up

❇️ OrclQA.Com is a question and answer forum for programmers.
❇️ Here anyone can ask questions and anyone can answer to help others.
❇️ It hardly takes a minute to sign up and it is 100% FREE.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now
Sign InSign Up

OrclQA.Com

OrclQA.Com Logo OrclQA.Com Logo

OrclQA.Com Navigation

  • Oracle
  • Oracle Apex
  • Python
  • Questions
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Ask Question
  • Add Post
  • Oracle
  • Oracle Apex
  • Python
  • Questions
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Comments
  1. Asked: February 3, 2021

    How to add one column data to another column in same row in Interactive Grid on oracle apex when select [email protected]?

    goto150

    goto150

    • Wroclaw, Poland
    • 0 Questions
    • 19 Answers
    • 4 Best Answers
    • 161 Points
    View Profile
    goto150 Professional
    Added an answer on February 6, 2021 at 4:37 am

    I have a feeling that you disliked my idea of using Action button:) Maybe this piece of code is going to serve your need. Revert changes for deselected row: var view = apex.region("SID_COLLECTION_LIST").widget().interactiveGrid("getViews","grid"); var model = view.model; var selectedRecords = view.gRead more

    I have a feeling that you disliked my idea of using Action button:)

    Maybe this piece of code is going to serve your need.

    Revert changes for deselected row:

    var view            = apex.region("SID_COLLECTION_LIST").widget().interactiveGrid("getViews","grid");
    var model           = view.model;
    var selectedRecords = view.getSelectedRecords();
    
    model.forEach(function(record,index, id) { 
          var meta = model.getRecordMetadata( id );
          if (selectedRecords.includes(record)){
    		   model.setValue( record, "COLLECTION_AMOUNT",model.getValue( record, "SERVICE_CHARGE" ))
    	   }
    	   else{
    		   if ( meta.updated ) {
    			   if ( model.canRevertRecord( record ) ) {
    				   model.revertRecords( [record] );
    			   }
    		   }    
          }
    }
    );
    
    
    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  2. Asked: February 3, 2021

    Oracle Apex 20.1 populate item in every new row in Interactive Grid

    goto150

    goto150

    • Wroclaw, Poland
    • 0 Questions
    • 19 Answers
    • 4 Best Answers
    • 161 Points
    View Profile
    goto150 Professional
    Added an answer on February 4, 2021 at 4:53 am

    Assuming you have PROJECT_NAME column, this will give you cell value of the previous record: var model = this.data.model,     rec = this.data.record,     meta = model.getRecordMetadata(this.data.recordId); if ( meta.inserted ) {     model.setValue(rec,"PROJECT_NAME", model.getValue( model.recordAt(mRead more

    Assuming you have PROJECT_NAME column, this will give you cell value of the previous record:

    var model = this.data.model,
        rec = this.data.record,
        meta = model.getRecordMetadata(this.data.recordId);
    if ( meta.inserted ) {
        model.setValue(rec,"PROJECT_NAME", model.getValue( model.recordAt(model.indexOf(rec)-1), "PROJECT_NAME" ));
    }

    You fire this on Row Initialization event.

    You may use model.getTotalRecords() to get the total number of records and look for the Project_Name value of last record.

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  3. Asked: January 23, 2021

    How to add one column data to another column in same row in Interactive Grid on oracle apex?

    goto150

    goto150

    • Wroclaw, Poland
    • 0 Questions
    • 19 Answers
    • 4 Best Answers
    • 161 Points
    View Profile
    goto150 Professional
    Added an answer on January 29, 2021 at 3:11 pm

    You're right. My bad, firstly this NVL2(:P5_BILL_...) column is virtual and secondly it does not leave cells in edit mode. I'd say lose-lose instead of win-win:) Lets try JavaScript. For the demo I am going to create a button to fire DA. Set Static ID for the region holding your interactive grid RegRead more

    You're right. My bad, firstly this NVL2(:P5_BILL_...) column is virtual and secondly it does not leave cells in edit mode. I'd say lose-lose instead of win-win:)

    Lets try JavaScript. For the demo I am going to create a button to fire DA.

    1. Set Static ID for the region holding your interactive grid
      1. Region properties --> Advanced
        1. Static ID = SID_COLLECTION_LIST
    2. Right click on the Region --> Create Button
      1. Button Name = Forecast
      2. Label = Forecast
      3. Button Position = Top of Region (to easily locate it)
    3. In Dynamic Actions tab right click on Events --> Create Dynamic Action
      1. Identification
        1. Name = Fill collection amount
      2. When
        1. Event = Click
        2. Selection Type = Button
        3. Button = Forecast
    4. True (action)
      1. Identification
        1. Action = Execute JavaScript Code
      2. Settings
        1. Code:
    var model   = apex.region("SID_COLLECTION_LIST").widget().interactiveGrid("getViews","grid").model;
    model.forEach(function( record ) {
    model.setValue( record, "COLLECTION_AMOUNT",model.getValue( record, "SERVICE_CHARGE" ));
    }
    );

    I hope this would help you, and the reason I did not add this to Change event of the LOV is that I would not know how to easily chain Refresh() --> DA (Fill collection amount). If you put both: Refresh and DA under :P6_BILL_MONTH Change() event, both will fire synchronously and you won't get your collection column refreshed.

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  4. Asked: January 26, 2021

    How to insert item data with default IG in IG table?

    goto150

    goto150

    • Wroclaw, Poland
    • 0 Questions
    • 19 Answers
    • 4 Best Answers
    • 161 Points
    View Profile
    goto150 Professional
    Added an answer on January 27, 2021 at 6:38 pm

    Let say you have a page, page item P_ITEM and Interactive Grid having column DEPENDANT. Depending on what you want to achieve you may either set a default source(1) for this column or default value in case of new row(2). Expand columns of your interactive grid end click on the column name you whishRead more

    Let say you have a page, page item P_ITEM and Interactive Grid having column DEPENDANT.

    Depending on what you want to achieve you may either set a default source(1) for this column or default value in case of new row(2).

    Expand columns of your interactive grid end click on the column name you whish to modify, follow either option 1 or 2.

    1. Default Source (page item is source for the column)
      1.  Go to Source:
        1. Type = SQL expression
        2. SQL Expression = :P_ITEM
    2. Default new entry (page item is default entry for new items)
      1. Go to Default:
        1. Type = Expression
        2. PL/SQL Expression = :P_ITEM

     

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter

Sidebar

Explore

  • Ask Question
  • Add Post

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
© 2022 OrclQA.Com. All Rights Reserved.
Privacy Policy - About Us