Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Return Cell Value on Click on Interactive Grid Cell

Afternoon,
I was wondering if someone can help with the below.
I have an Interactive Grid (See Below), and i want the user to be able to click on a specific RAG value, and that populate the associated value from the Required Country column (same row as the rag that was clicked on), into a hidden field on my page.
i.e. Click on he RAG icon on the Anoc row, and Anoc value is stored in the hidden field.
The RAG column is already a HTML Expression type.
Ill use the value from the hidden field item to drive a pop up form to show the detail behind the rag for that country
As always any help appreciated.
I'm using Version 19.2
Regards
Best Answer
-
Hi SteveQuinlivan,
- Give your IG a static id e.g. "emp"
- In your HTML column add a data-action to get for example EMPNO value (my data-action is "get-empno"):
<button type="button" class="a-Button a-Button--noLabel a-Button--iconTextButton js-actionButton" data-action="get-empno"> <span class="fa fa-trash-o"></span> </button>
- In IG JavaScript Initialization Code attribute (replace EMPNO with your column name) :
function(config) { config.initActions = function(actions) { actions.add({ name: "get-empno", labelKey: "Get Empno", action: function(event, element) { var view = view = apex.region("emp").call("getCurrentView"), model = view.model, empnoKey = model.getFieldKey('EMPNO'), empno = view.getContextRecord(element)[0][empnoKey]; $s('P24_EMPNO', empno); } }); } return config; }
The P24_EMPNO is the item that holds the EMPNO value.
I have demonstrate an example in my workspace :
Workspace: hamzasoft
Username/Password: demo/demo000
Application 62472 - Page 24
Answers
-
Hi SteveQuinlivan,
- Give your IG a static id e.g. "emp"
- In your HTML column add a data-action to get for example EMPNO value (my data-action is "get-empno"):
<button type="button" class="a-Button a-Button--noLabel a-Button--iconTextButton js-actionButton" data-action="get-empno"> <span class="fa fa-trash-o"></span> </button>
- In IG JavaScript Initialization Code attribute (replace EMPNO with your column name) :
function(config) { config.initActions = function(actions) { actions.add({ name: "get-empno", labelKey: "Get Empno", action: function(event, element) { var view = view = apex.region("emp").call("getCurrentView"), model = view.model, empnoKey = model.getFieldKey('EMPNO'), empno = view.getContextRecord(element)[0][empnoKey]; $s('P24_EMPNO', empno); } }); } return config; }
The P24_EMPNO is the item that holds the EMPNO value.
I have demonstrate an example in my workspace :
Workspace: hamzasoft
Username/Password: demo/demo000
Application 62472 - Page 24