Discussions
Categories
- 196.9K All Categories
- 2.2K Data
- 240 Big Data Appliance
- 1.9K Data Science
- 450.4K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 546 SQLcl
- 4K SQL Developer Data Modeler
- 187.1K SQL & PL/SQL
- 21.3K SQL Developer
- 295.9K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.6K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 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
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 443 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
How do I set the #REGION_ID# from the region template?

BillC
Member Posts: 1,069 Bronze Badge
Hi,
I know where to set the #REGION_STATIC_ID#
in a region template but can't find the text field or way to set the #REGION_ID#.
Once it is set I am hoping to access it in Javascript as the table id of the report table.
Am I on the right track?
Where do I set it?
Bill
I know where to set the #REGION_STATIC_ID#
in a region template but can't find the text field or way to set the #REGION_ID#.
Once it is set I am hoping to access it in Javascript as the table id of the report table.
Am I on the right track?
Where do I set it?
Bill
Answers
-
Hi Bill,
Why can't you use REGION_STATIC_ID to do that?
John.
--------------------------------------------
http://jes.blogs.shellprompt.net
http://www.apex-evangelists.com -
Because you have to use a modified template don't you?
The normal Reports Region that I use has #REGION_ID#as a normal ID just don't know how to access it.. -
Well I just changed the #REGION_ID# in the standard template to #REGION_STATIC_ID# just to see if I'm on the right track.
But APEX puts another table within this "Region" table so this ID is accessing the wrong table.
How do I put an id on something within a report without using the APEX_ITEMs. I do it all the time with APEX_ITEMs but I was hoping to learn how to do it with the generic report. -
Hello Bill,
>> but can't find the text field or way to set the #REGION_ID#.
The #REGION_ID# substitution string is being set, internally, by the APEX engine, and you can’t change it (because this value is one of the PK identified the region).
So, your options are to use #REGION_STATIC_ID#, which you can set as you need, or the original #REGION_ID#, and retrieve its value from the APEX dictionary.
>> Because you have to use a modified template don't you?
Yes. You need to substitute #REGIN_ID# with #REGIN_STATIC_ID#. The APEX engine is smart enough to substitute this string with the original region id, if you didn’t provide a value for the static id (which means you have backward compatibility for regions without static id).
>> But APEX puts another table within this "Region" table so this ID is accessing the wrong table.
I don’t know thr theme you are working with, but as far as I know, if you modifying the template, the static id will replace the original id, and not on top of it.
The normal Reports Region that I use has #REGION_ID#as a normal ID just don't know how to access it..
If, for any reason, you want to continue using the original region id, you can retrieve it from the APEX dictionary. You can use similar code to the following:
Select region_id
from APEX_APPLICATION_PAGE_REGIONS
where application_id=:APP_ID
and page_id=:APP_PAGE_ID
and region_name=<<region name>>
Regards,
Arie. -
Hello,
If your trying to get access to the region body or some other element of the region you can also do something like
id="#REGION_STATIC_ID#_body"
if you look at some of the newer themes you'll see that in places.
Carl -
Hi Carl,
It work great to access the "Region" table, But the table I see I really need to access is the one within the region.
I'm trying to just add rows to a report with JS. I have 2 reports, 1 that shows the rows in my XREF table and 1 that I select the rows to insert into the XREF table.
When I click on the id of a row to move it hides that row, AJAX inserts it to that XREF table and then I add the row to the table just to show that it was moved.
Can I access that inner table easily? One idea was to you the APEX_ITEM to give each row an id so I can cascadeUpTil get to the TABLE but it doesn't work if there is no rows. No rows, no IDs available.
Thank you, Bill -
If your trying to get access to the region body or some other element of the region you can also do something likeI've had some problems with that.
id="#REGION_STATIC_ID#_body"
if you look at some of the newer themes you'll see that in places.
2573425
This discussion has been closed.