Displaying items based on Query record count (Forms 4.5)
I have a special requirement.
Assume col1 that I am selecting from table temp.
select col1 from temp;
Now if query fetches 9 records.
Each column I want to show like this.
1 2 3 4 5 6
7 8 9
If query fetches 15 records.
Each column I want to show like this.
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15.
That means items displayed on screen chages based on output of
query.
Pls. suggest some solution.
null
When i made the above query a view and created an oracle portal form. I get this error when I try to retrieve all the records in that view i made above.
An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
What does the "key-preserved table" mean?
Similar Messages
-
Displaying items based on Query record count
I have a special requirement.
Assume col1 that I am selecting from table temp.
select col1 from temp;
Now if query fetches 9 records.
Each column I want to show like this.
1 2 3 4 5 6
7 8 9
If query fetches 15 records.
Each column I want to show like this.
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15.
That means items displayed on screen chages based on output of
query.
Pls. suggest some solution.
nullYou can't do this with the custom search portlet.
You can use Omniportlet to display the items - using the SQL datasource (new in the July PDK) to query the content repository views. You could use the parameter form portlet provided with Omniportlet to build the selection list.
Regards,
Jerry
PortalPM -
How can i display recent update/delete/insert records in form
Hai !!!!
i am new for forms,.......any body tell me, how can i display recent no of records updated or no of records deleted or no of records are inserted in a form. these records count are display in display items....give me detail explination......
Subbu.....the easiest way is copy and paste the oracle-forms example from the OU.
You need form-level-trigger ON-ERROR + ON-MESSAGE, POST-INSERT, POST-UPDATE, POST-DELETE, three global variables and a procedure:
ON-ERROR
handle_message( error_code, 'ERROR: ' || ERROR_TYPE || '-' || TO_CHAR(ERROR_CODE) ||': '|| ERROR_TEXT );
ON-MESSAGE
handle_message( message_code, MESSAGE_TYPE || '-' || TO_CHAR(MESSAGE_CODE) || ': ' || MESSAGE_TEXT );
PROCEDURE handle_message( message_number IN NUMBER, message_line IN VARCHAR2 ) IS
BEGIN
IF message_number IN ( 40400, 40406, 40407 )
THEN
DEFAULT_VALUE( '0', 'GLOBAL.insert' );
DEFAULT_VALUE( '0', 'GLOBAL.update' );
DEFAULT_VALUE( '0', 'GLOBAL.delete' );
MESSAGE('Save Ok: ' ||
:GLOBAL.insert || ' records inserted, ' ||
:GLOBAL.update || ' records updated, ' ||
:GLOBAL.delete || ' records deleted !!!' );
ERASE('GLOBAL.insert');
ERASE('GLOBAL.update');
ERASE('GLOBAL.delete');
ELSE
MESSAGE(message_line );
END IF;
END;
POST-INSERT
DEFAULT_VALUE('0', 'GLOBAL.insert');
:GLOBAL.insert := TO_CHAR( TO_NUMBER( :GLOBAL.insert ) + 1 );
POST-UPDATE
DEFAULT_VALUE('0', 'GLOBAL.update');
:GLOBAL.update := TO_CHAR( TO_NUMBER( :GLOBAL.update ) + 1 );
POST-DELETE
DEFAULT_VALUE('0', 'GLOBAL.delete');
:GLOBAL.delete := TO_CHAR( TO_NUMBER( :GLOBAL.delete ) + 1 );try it
Gerd -
Building a block based on the records fetched - Forms 10g
Is there a way in forms to dynamically build the block ( I mean in a multi record block, we usally set the number of records displayed in the property pallete) Instead of setting the property is there a way that we can do it based on the records fetched by the query?
select a.unit_id, substr(b.product_code,1,5)
from [email protected] a,[email protected] b
where substr(a.product_code,1,5) = b.product_code
and substr(a.product_code,1,5) = 'E3088'
and inv_product_type in ('PHER','LPHER','VPHER')
and warehouse_id = 'A'
This is the query.
If the query for product_code fetched 5 units for product code = 'E3088' of inv_product_type as mentioned in the query, is if possible to build the multi record block? For another product E3077 it might give us 6 records.
User wants me to see if I can do it? Is it possible?
Thanks in advance.
AnuHi,
I've not tried this and can't say for sure if it is possible or not.
But, have a look at this link Re: Automatic Number of record displayed .
I'd thought of a solution but never tried myself. Try if it works for you.
If it doesn't, i think it will not be possible in oracle forms.
Navnit -
How to not display certain items based upon certain criteria (Edit Form)
I have a Edit form which was created from an interactive report I generated.
There are 10 item fields which are listed which can be changed.
Sometimes I want to see just 9 of the fields on the form based on what the value is of another field in the record.
When I display the fields on the Interactive report I can filter this out by using a case statement, but how
do I do this with the edit form as the query is not there.
Thanks for your time in advance,
AnonUse Conditions to control whether the item appears or not.
In the item definition is a Conditions section where a large number of different types of condition can be used to determine whether the item is rendered. These include comparisons of the value of the item, or another item, items being null, and a lot of other options. Conditions are widely used throughout APEX—sometimes in subtle or noninuitive ways—so it's worthwhile studying how they're used. -
Need help displaying item based on pl/sql anonymous block
This is probably something really simple but I'm stuck.....
On purchase order, I want to show related parent project name and ID. What is the best way to do it? I have created a region based on pl/sql anonymous block, and that works, but the data is above where I want it. I want the project name and ID to show up in the region w/ all the other fields.
I have created an item in the region that has other form fields, item is based on pl/sql anonymous block, w/ same code as above region, and the item doesn't find the data. What's the difference? Is it because the item doesn't save state? In order to choose for the item to be based on pl/sql anon block, APEX made me choose Display as Text (based on PLSQL, does not save state).
Please see this picture:
http://farm3.static.flickr.com/2391/2658673285_04f157a3fa_o.png
thanks!
~Darbythis is weird.. Now it is working. I didn't change anything! What the heck?
http://farm3.static.flickr.com/2010/2659557520_73e54b67ea_o.png -
Displaying data based on selection in tabler form
Hi ALL,
I have created report with three columns, from the three first column is select list. And initially user can't see any record, once user select "Add Row" button then one row will be displayed with empty data. Now when user selects one value from first column of select list then data needs to get populated for other columns in the row.
I am able to do this it the select list is an item with a property of "select list on submit". But I could not able to go with the tabler form.
Can anyone help me and also make me to find a related example too...
Thanks & Regards
VishwanathHi All,
Please tell me if my question is not clear. I am waiting for the reply. Please help out in resolving this issue.
Thanks
Vishwanath -
Add a form (based on query) to a form (based on table)
I have a normal form based on a table. I want to put in a little form in a region of this first form that is based on a query. They have one field in common.
How can I do this?
ElsieHi Elsie,
Effectively, you want to end up with a single form and save the data back into two or more tables?
If so, you could base the entire form on a SQL view and use an INSTEAD OF trigger to update the underlying tables.
Regards
Andy -
Conditionally display items based on null LOV value
Hello,
I've seen several examples that do what I'd like to do but with different implementations. Perhaps someone can steer me in the right direction...
I have a pop-up lov that pulls a list of names from various places. If, however, the name cannot be found I'd like to display a few text boxes where the user can enter a new name.
For my list of values I have configured the following:
Display Null: Yes
Null Return Value: -1
Null Display Value: Not Found
My HTML Form Element Attributes has: onchange="doSubmit()";
My Source section has:
Source Used: Only when current value in session state is null
Source Type: Static Assignment (value equals source attribute)
My entry text boxes have a condition specified:
Value of Item In Expression1 = Expression 2
Expression 1: P4_LOOKUP_NAME
Expression 2: -1
I also have an unconditional branch to this same page (Page 4) that sets the value of P4_LOOKUP_NAME to P4_LOOKUP_NAME.
I cannot seem to get this item to display though...any thoughts?
Thanks in advance for your suggestions!jhammer,
I like the concept. This would require a custom popup lov - something that can be a little tricky/time consuming the first time around. The popup lov would probably have to create new entries via Ajax to be able to pass back the correct ID/display values to the parent window on close.
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen
You can reward this reply by marking it as either Helpful or Correct ;-) -
Display items based on Orderby field
HI,
I have a custom list, in which I have columns like "DisplayOrder", "Title", "Value". I am showing the contents of the list in a div in a custom webpart (javascript client object model).
The data are loading, but is not following the "DisplayOrder".
Example: In the custom list, I have data as below:
Title Value DisplayOrder
One ab 2
Two cd 3
Three ef 1
I have used the below code in Javascript client object model:
function loadConfigData() {
var configquery = new SP.CamlQuery();
configquery.set_viewXml('<View> <Query> <OrderBy><FieldRef Name="DisplayOrder" /></OrderBy> </Query> <ViewFields><FieldRef Name="Title" /><FieldRef Name="Value" /><FieldRef Name="DisplayOrder" /></ViewFields> </View>');
this.Allitems = oSubList.getItems(configquery);
clientContext.load(Allitems);
clientContext.executeQueryAsync(Function.createDelegate(this, this.NewConfigsuccess), Function.createDelegate(this, this.Configfailed));
function NewConfigsuccess() {
var right = 30;
var count = this.Allitems.get_count();
if (count >= 1) {
var configenumerator = this.Allitems.getEnumerator();
while (configenumerator.moveNext()) {
var currentItem = configenumerator.get_current();
var iTitle = currentItem.get_item('Title');
var iValue = currentItem.get_item('Value');
var newText = "";
if (iTitle!= null && iTitle != "" && iValue != null & iValue != "") {
newText = '<table class="tblContent"><tr><td class="tblLeftContent"><a style="color:white;" href="' + captionURL + '"> <img src="/_layouts/15/Images/bannertest.png" alt="' + iTitle + '"/></a></td>';
newText = newText + '<td class="tblRightContent"><div class="middlecontent"><a style="color:white;" href="' + iValue + '">' + iTitle+ '</a></td></div></tr></table>';
listdata = listdata + '<div class="BottomTitleBanner" style="right:' + right + 'px;">' + newText + '</div>';
right = right + 105;
Here, I want the data to load as "Three", "One" , "Two".
How to fix this?
Thanksfunction GetListItem() {
$.ajax({
type: "GET",
headers: {
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
url: "http://XXXXXX/_api/web/Lists/getbytitle('OrderList')/Items?$select=Title,Test&$orderby=Test asc",
success: function (data) {
$.each(data.d.results, function (index, item) {
$('#oDataSuppliers').append("<li>" + "<h1>" + item.Test + "</h1>" + "</li>");
failure: function (data) { console.log(data); }
You can get the column order like this -
Php check all records in database then display results based on chosen record
I have a form that is checking the database to see if a record exists .
If it does exist then it needs to perform one of two tasks, either subtract or multiple.
This part is working but the part that is not working is it is only checking the first record of the database and it should be checking all records as each record will give a different result
the sql is
mysql_select_db($database_lotties, $lotties);
$query_rsVoucher = "SELECT * FROM LOTTIE_vouchercode";
$rsVoucher = mysql_query($query_rsVoucher, $lotties) or die(mysql_error());
$row_rsVoucher = mysql_fetch_assoc($rsVoucher);
$totalRows_rsVoucher = mysql_num_rows($rsVoucher);
// then check
if (isset($_POST['vouchCode']) && $_POST['vouchCode'] == $row_rsVoucher['VCode']) {
$mycode = $row_rsVoucher['VCode'];
$spos = strpos($mycode, "f");
if ($spos !== false) {
$myvalue = substr($mycode, $spos+1);
$myvalue = $XCart_sumTotal * $myvalue / 100;
} else {
$spos = strpos($mycode, "p");
if ($spos !== false) {
$myvalue = substr($mycode, $spos+1);
$myTotal = $XCart_sumTotal - $myvalue;
$_SESSION['vouchCode'] = $myvalue;
} else unset($_SESSION['vouchCode']);
the form is
<form action="<?php echo $editFormAction; ?>" method="post" name="form2" id="form2">
<input type="text" name="vouchCode" value="<?php echo @$_POST['vouchCode']; ?>" size="32" />
<input type="submit" value="update" />
</form>
then the results are displayed
<?php if (isset($myvalue)) { ?>
<?php echo DoFormatCurrency($myvalue, 2, ',', '.', '£ ', ''); ?>
<?php } ?>
i am getting really desperate with this so any help would be appreciated
thanksJonathan Fortis wrote:
>>You really should hire someone to write your server side code as you still don't understand programming basics.
i did but he passed away. And i am getting an understanding just still cant get the hang of loops
jonathan, jonathan, jonathan,
Condolences to your deceased php developer. Was he the only professional php developer in the world? I don't think so! Enough with your excuses already. Find a professional php developer that is currecntly living then and stop looking for free professional work for your specific, profitable development requirements on a forum.
best,
Shocker -
Populate multi record display item
Hellou gurus!
I have forms 10g and i need to populate display item in enter query mode. My problem is that I have table T1 with some static values. Table T2 is through ID connected (reference) to table T1 1:1 cardinality and T2 table also have reference to T3 table.
I have block B2 based on table T2 and in this block I have multirecord item for inserting and updating new values for T2, but in this block ii also have no DB, multi record display item (because i don't want to allow editting in T1 table records) for diplaying static values for table T1. I want to display all static values from T1 next to the editable values in T2 (T2 multi record field is not insert yet). I tried for loop, select into but it not work. T1 values need to be selected before I started to inserting values into T2 items, but off course they need to be referenced It is hard to explain but i belive you understand.
Can you help me how I can populate multi record item??You have to write the code again for your second list item....
group_id RecordGroup;
list_id Item := Find_Item('button.tyear');
list_id1 Item := Find_Item('button.tperiod');
status NUMBER;
rg_name varchar2(40) := 'recgroup';
BEGIN
----------------------------- LIST
clear_list(list_id);
group_id := Find_Group(rg_name);
IF NOT id_null(group_id) then
Delete_Group(group_id);
End if;
group_id := Create_Group_From_Query(rg_name,
'select vm_year, vm_year from fwqgl.vouchermaster
group by vm_year');
status := Populate_Group(rg_name);
Populate_List(list_id, group_id);
/* --------------------SECOND LIST ITEM...BUT REC. GRP NAME CAN BE SAME,better to use another name if you need to retrieve list and store qry..other wise the fol. code is enuf-----------------------*/
clear_list(list_id1);
group_id := Find_Group(rg_name);
IF NOT id_null(group_id) then
Delete_Group(group_id);
End if;
group_id := Create_Group_From_Query(rg_name,
'select vm_period, vm_period from fwqgl.vouchermaster
group by vm_period');
status := Populate_Group(rg_name);
Populate_List(list_id1, group_id);
END;Edited by: Dora on Dec 5, 2009 10:41 AM -
How to display a record count in a text field?
I am trying to return a record count of a query and place that count in a text field on my search page in APEX. I have that text field defined under Items on the search page. How do I get a query record count to display in my text field?
Thanks,
John
Edited by: user7381760 on Jan 22, 2009 3:47 PMHi Dan,
Thank you for your reply and yes I was able to select "Source Type" and "SQL Query". The SQL expression I used was:
SELECT COUNT(ID) FROM master_table;
This worked great to count the total number of records from the master_table. However what I am trying to do is to get a record count each time I complete a search from my search page. I have input fields on this page and a GO button which executes the query. The SQL query is location in one place under Regions/Display Point. My display field on my search page is named P16_COUNT2 and I was trying to make this work inside the main query code. I tryed something like this, COUNT(ID) INTO :P16_COUNT2, to pass the record count each time I execute the GO botton to P16_COUNT2 field. This I could not get to work. Any ideas how to proceed?
Regards,
John -
Webforms - display items appearing as black
Hi,
I need somebody's help. When I navigate from a custom built form to a third party application form all display items in the third party appl. form are blackened out.
This state persists throughout the session for all third party appl. forms.
I initially thought that it was a global value which
I had not set when navigating from custom form to other form.
I've spoken to the company that built these forms and they
state that they do not set any visual attributes etc. programmatically.
Their visual attributes on the form is default, foreground/background colour= <unspecified>
Have I missed something in my formsweb.cfg?
I have already set:
lookandfeel=generic
readOnlyBackground=automatic
darkLook=false
in the config file.
PLEASE HELP.
Thanks
Dave MolloyHi Sheetal,
For this you need to change your XMl config file. Please use below code
<DisplayAttribute name="subject" type="link" width=""
sortable="yes" format="default" actionRef="viewDetail" referenceBundle="subject"
hAlign="LEFT" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes"/>
To get Hyper link we need to define the type="link" and when we click on hyper link
some action gets executed so we define the actionRef="viewDetail"
Regards,
Piyush -
Query to display all records count of all tables in a schema
Hi,
I need to count all the records of all my tables in a certain schema and display the max amount of the record count. Do you have a script for this one??SQL> create function countrec(in_tab in varchar2) return number is
2 retval number;
3 begin
4 execute immediate 'select count(*) from '||in_tab into retval;
5 return retval;
6 end;
7 /
Function created.
SQL> select table_name, countrec(table_name)
2 from tabs;
TABLE_NAME COUNTREC(TABLE_NAME)
QUERY_TOOL_DATA_COLLECTION 5
TEST01 0
T1 14
EMP 14
SALGRADE 5
FILES 0
PROVA 0
TEST 0
T_MASTER 1
T_CHILD 3
TAB_ONE 30
TAB_TWO 10
A 3
B 4
C 3
D 3
BONUS 0
DEPT 4
18 rows selected.Max
Maybe you are looking for
-
Just downloaded a HD movie to my computer (brand new MacBook Pro, all software up to date) and can't watch it on my Apple TV (brand new last year, all software upto date). Using Airplay mirroring works fine in general but when I press play on the mo
-
I'm trying to get in contact with Adobe Support because I need to activate my Serial Number for CS5. I'm installing CS6 upgrade, but it keeps asking for the Serial Number of my first version CS5. The Serial number that I enter is not recognized as va
-
Display multiple pages of PDF in ABAP webdynpro
Hi Friends, We have a requirement, where we have to display all the pages of PDF in ESS Portal using Abap WD. I have got the xstring data for all PDF pages. How can I display them now? I used interactive form, but it can display just one page. I
-
ADF BC - Date Picker closes Popup
Hi all, I have a inputDate field inside of a form which is in a popup. When i choose a date from the date picker that comes up, (the one built in to the inputDate field) my popup closes. Is there a way to keep the popup open until a user clicks back
-
System refresh /DB Copy Query
Dear All, I am going to refresh my QAS box from PRD first time. But I have one confusion regarding recover archive logs. Backup archive logs are in compress mode i.e <SID>arch1_22746.dbf.Z and in normal Scenario it should be <SID>arch1_22746.dbf. The