oracle ADF related query - oracle

there is one search page in ORACLE ADF with header & line section ... in header section i search for the customer id (i can also search with any column name like customer name , organization id etc) then in line section it will show me all the customer related to that customer id now in line section i make that customer id a hyperlink and as user click on that link (customer id) it will show a popup contain all the details related to that customer (around 700 column)..column names are like column 1,column 2,column3 ....column 700 like that and the name of this column 1 ,column 2 up-to column 700 is stored in some other table so how can i change that column1 ,column2 ...column 700 with their actual name (which is stored in some different table ).

One thing you might trey is to Query the other table using this:How can I get column names from a table in Oracle? to get the column names and then use the VO api to change the hint for the column: ADF how to convert column name to attribute anme

You use two VOs in the page.
VO1 fetches column names, the other VO2 fetches column values.
Create a Form based on VO2, then go to each column and update the label attribute for that column to point to the right value from VO1.

Related

How to save the data in a different column instead of replacing the data in same column

I have one field on my form (field example name "completion_date"). This data is stored to table column "completion_date". When users edits the detail, data is overwritten in the backend table field as a default way of storing the data. How can I pass on the existing data in this column to a new column (completion_date_a) when the user saves a new date in the field.
One option is to create a database trigger, e.g.
create or replace trigger trg_bu_date
before update on your_table
for each row
begin
:new.completion_date_a := :old.completion_date;
end;
/
Littlefoots' answer is correct, but you could also do this in apex with very little work. Suppose your form items are P1_COMPLETION_DATE and P1_COMPLETION_DATE_A, both mapped to their respective database column. P1_COMPLETION_DATE_A is hidden. Add a computation to P1_COMPLETION_DATE_A with point "After Header" and type "Item". Pick P1_COMPLETION_DATE as item.
Now when you save the form, the value of P1_COMPLETION_DATE_A will be set to the value of P1_COMPLETION_DATE when it was selected.

create a drop down in laravel 7 with list values from postgres database, and insert in another text field from the same database

i am new to laravel 7, i have a postgres database table contact with two columns name and email id. the drop menu values will list the values from the name column, the corresponding value in email id has to displayed in the adjacent text box.
could you guys please help with code, in terms of view and controller.
Thanks

oracle forms not showing all fields

I have 2 tables: product which has primary key product_id and Review which has product_id which references the product_id of product table;
I created form master-detail for them but when executing I get at the bottom of page:
FRM-40505: ORACLE error: unable to perform query
and when pressing ctrl+shift+e I get:
SELECT ROWID, REVIEW_ID, LIKE, DISLIKE, FIRST_NAME, LAST_NAME, PRODUCT_ID
FROM U1.REVIEW WHERE (PRODUCT_ID=:1)
ORA-00936: missing expression
how to solve this? what is wrong? thank you in advance
Seems you have a field named like in your block with base table named review has Database Item set to Yes in the property palette, and for this reason Oracle treats that field as if a column of the table, but there's no such column, and not possible to have a column named like within a db table, since it's a reserved keyword.

Oracle Apex: show picture in report from a different table?

I have the following apex report :
select id,
user_ as participant,
--This is a blob
dbms_lob.getlength(MY_UTILITIES.GetUserPicture(user_)) as Picture,
order_ as order_
from My_Operations
I would like to display the column Picture as an image in the report. It's a blob stored in another table : Table My_Users (the Primary key column name is 'ID')
I configured as follows the Picture Column :
enter image description here
The report generates but the picture doesn't show :
enter image description here
I'm sure using this implementation Apex has no way to know that the field picture corresponds to the row X in the table My_Users.
Does anyone know how to correct that please ?
Cheers,
The way APEX displays images in reports is somewhat weird and wacky it would seem. What you need to do is apparently undocumented but I believe it is as follows:
The column that will be displayed as an image must contain the length of the BLOB column (which you have done correctly). I found this out from this blog post.
The column specified for Primary Key Column 1 specified in the BLOB attributes of that column must also appear in the report with the same name. I figured that out by trial and error.
You have aliased column user_ as participant. APEX requires it to be called ID - but you already have a different column called ID! So I think you should try this:
select id as op_id,
user_ as id,
dbms_lob.getlength(MY_UTILITIES.GetUserPicture(user_)) as Picture,
order_ as order_
from My_Operations

Delete columns from BIRT report

I have a BIRT Excel Report with 10 columns. I have a query which executes and brings the data for all the 10 columns.
However, based on one of the input parameters, i need to display just 8 columns. I am able to hide the remaining 2 columns but i would like to delete those 2 columns from the report so that user does not see the hidden columns.
I tried to change the query but i am unable to dynamically set the select parameters.
Is there a way either in Query or in BIRT to remove few columns based on an input condition.
You cannot delete the columns, but it's sufficient to hide them dynamically using the column's visibility expression. You can add an aggregation to the table, using the MAX function for the column data (let's call it max_name).
E.g. if your table column shows the DS column NAME and you want to hide the column if NAME is empty for all rows:
Add an aggration (let's call it MAX_NAME) to the table, with the aggregation function MAX and the expression NAME. Then in the visibility expression of the table column, use !row["MAX_NAME"] as the expression.
After drag and drop the dataset. Right click on column header and select the delete column option.

Resources