How to display a column value in "hint" property in Oracle Forms 6i? - oracle

I'm new in Oracle Forms and I would like to display in "Hint" section of my forms a value from every column comments from the table used in the forms. Do you have any idea? Thanks.

You can use get_item_property and set_item_property to dynamically get and set the hint text from items:
Get_Item_Property(it_id,HINT_TEXT);
Set_Item_Property(it_id,HINT_TEXT,'value');

Maybe you want to retrive column table comments in the following way:
select comments
from all_col_comments
where table_name = 'EMPLOYEES'
and column_name = 'FIRST_NAME';
In a form trigger WHEN_NEW_ITEM_INSTANCE at form level,
you could retrive that comment according to the current item and current block.

Related

Make Specific rows not editable using Interactive Report

I am using Apex 18.2. I created an interactive report which has 10 records. I try to add a logic that user can only be able to edit those records which recently created. User cannot do an edit to an old records. Means when user try to edit old records, it show as 'Display only' or not editable. Is there any way I can do that? Your help is really appreciated. Thanks
One option is to create your own link (icon, if you wish), just like another column in report's query.
As you're in SQL now, use any condition you want. Obviously, you have to be able to distinguish "old" from "new" rows. If we suppose that it is some DATE datatype column, so whatever is "yesterday" or older is considered to be "old", you'd
select case when datum < trunc(sysdate) then null
else 'Click here'
end as link,
empno,
ename
from emp
LINK column's type would be "link" (of course) and you'd make it navigate to another page in this application, pass values from here to there, etc.

Selecting oracle column header

I've been browsing and to no avail, I can't find any information on how to select/show only the column header. My objective is to select only column header . I've uploaded a picture for better illustration on my objective. In the picture shown, I'm trying to only select and display the one ive highlighted in the red box.
Oracle table:
The only information I found from the net is selecting an individual column, and with that. It will display the data as well which is not my objective. my main objective is to only select column headings.
In Oracle APEX SQL Workshop you can describe a table with this command:
desc table_name
If you're using a query, you can click on the "Describe" tab below the query and above the result grid.
I had a similar requirement, so in page designer I plugged in a "Where Clause = Sysdate-1"
you can use select and null to pick columns and use alias to name them
select null AS column_name,null AS column_name
from TABLE_NAME

Pre Populate Text Fields in Apex

I'm trying to fill out various text fields on an apex application when I select a Reference Number in a select list.
When the page loads I'd like the text fields to be filled with the information from the database related to the reference number from the select list, however, I don't know how to do so. Any suggestions or help would be most appreciated!
As far as I understood the question:
user opens a page
there's a Select List item
user picks a value
you want to populate certain items on that page, based on a value user previously selected
If that's so, you'd use a dynamic action - create it on the Select List item, pick set value type.
[EDIT: How to do that?]
Scott's schema, DEPT table. Suppose that the select list item is P15_DEPTNO, while two other items are P15_LOC and P15_DNAME.
create a dynamic action on P15_DEPTNO
event: change
item: P15_DEPTNO
create its True action:
action: set value
type: SQL statement
select loc, dname
from dept
where deptno = :P15_DEPTNO
items to submit: P15_DEPTNO
affected elements: items P15_LOC, P15_DNAME
That's all.

Oracle Forms 6i Resolve LOV code

I have a LOV with two columns one is code and the other is description. I know that text items have a property which says validate from list however my code field and description field are display items. We do not want to force the user to click on a button to show the LOV. In the pre-form trigger i am setting a default value in the code field.
I would like to get/resolve the code to its description from the list without having to do a select from the database. Does anyone know of a way to get this done?
I have had also this very same problem. There might not be a solution to retrieve the label column from record group in the runtime.
But you could do this:
Store the record group query somewhere (package header or DB column).
Populate your record group with query in the runtime.
Create DB function which takes query and key value as parameters. The function would then return description of the key value (use dynamic SQL, execute immediate / dbms_sql).
Use the function in the POST-QUERY trigger:
:block.item_description := your_new_function(l_query, :block.item_value);

How to update column values to database in phpfox project

I need to update the column values to table in phpfox forum module posting new thread general type. I have found the table name in coding (query) and added values to column but I am not getting col values. Can anybody help?
my db name : munpal
table name : forum_post
colmun name : mark value (here I need to add my values )
Open module\forum\include\service\thread\process.class.php and look add function in that.
This function is called when a thread is added you can modify the function according to your need. May this helps you

Resources