Form vs Tabular
I have 2 forms that have the same exact DB - table in the same database.
I noticed when I run the same exact query with the same exact code, the form canvas that display 1 record at a time returns 30 records. When I run code in the tabluar canvas, I return 19 records.
When I run the same exact query in sqlplus, I get 30 records.
Is there a setting I have that could possibly effect the result set or possibly a know bug running tabular canvas? Any ideas?
I don't think so. Do you have any WHEN-NEW-FORM-INSTANCE trigger which sets the WHERE clause of the block to filter records? Also make sure the block on which the table is present has any where clause (in the property palette) that could probably be the cause. In order to debug, try creating a simple form (based on same db and table) and check if you are getting 30 records in that.
-Arun
Similar Messages
-
Source tables for forms and tabular forms must have a primary key.
Why does HTML DB 2.0 return the message
"Source tables for forms and tabular forms must have a primary key."
when trying to generate a "Report and Form" page based on a view defined like "create view <applicationschema>.a as select * from <sourceschema>.b" ?
It should be possible for HTML DB to "see" that the table "<sourceschema>.b" already has a primary key.
bw - ChristianChristian,
In the create application wizard, when creating form or tabular form pages, you can only use tables with primary keys, and not views, because that wizard is automatically deriving the primary key from the table definition. If you want to build forms on views or tables without a primary key, you need to use one of the create form wizards while working on an existing application. Those wizards allow you to pick your own column as a primary key column.
Regards,
Marc -
Dynamic Form in Tabular Form i.e SET VALUE
Hi,
I have an tabular form ,
In which two column are there i.e username and department
Just I wnt to know can dynamic action i.e SET VALUE CAN BE USED IN TABULAR FORM.
AS I CHANGE THE USERNAME THERE PERSPECTIVE DEPARTMENT SHOULD CHANGE.
can anyone help.Hello Trent,
I too, am attempting to set the value of an item when another item is changed.
I need to capture the APP_USER changing the row for each row changed in the tabular form when submitted.
My table is in a remote database that is not allowed to have APEX loaded directly in the instance (or db link TO the APEX instance).
Can’t get the APP_USER making the change at this level, as the APEX code is not there.
The instance that hosts the APEX installation accesses the table via a view through a db link.
Can’t use a trigger on the view to set the APP_USER using APEX functionality.
Not desirable to re-invent the IUD wheel using instead-of triggers.
The example you posted on http://apex.oracle.com/pls/apex/f?p=45448:11 is exactly what I need (even though your example sets the value on Lose Focus and I Set value on Change).
I am attempting to implement the dynamic action for the item using your javascript, and am almost there....but not quite. The dynamic action is updating the target item in ALL the rows in the tabular form, not just the one that is being changed.
This, I am sure, is due to my inexperience with Dynamic Actions, jquery syntax, and the javascript API’s for APEX. I believe I know what the issue IS, I’m just not sure how to work around it.
Please note: I attempted to download your example at the above website (turning off popup blockers), but had no success (I got the thank-you for downloading message, but have no clue what was downloaded to where). I was hoping to compare your form Dynamic action with mine to see where I went wrong.
If you could please, review the following and:
1) let me know what might be different from your working example?
2) provide info on how to get your working form downloaded (such a tease to have the download link there and not get it to work ;0} ) , please?
The following shows the html from view source for a row in my tabular form. This will help you get an idea of the items. The actual number of rows in the form is about 50.
<table cellpadding="0" border="0" cellspacing="0" summary="" class="report-standard">
<tr class="highlight-row">
<td headers="CHECK$01" class="data">
<label for="f01_0002" class="hideMe508">CHECK$01</label>
<input type="checkbox" name="f01" value="2" class="row-selector" id="f01_0002" />
</td>
<td headers="JOBNO_DISPLAY" class="data">X111Y2222</td>
<td align="center" headers="DEPR" class="data">
<label for="f03_0002" class="hideMe508">DEPR</label>
<input type="checkbox" name="f03_NOSUBMIT" value="1" id="f03_0002_01"
onClick="if (this.checked) {apex.jQuery('#f03_0002').val('1');}
else {apex.jQuery('#f03_0002').val('');}" />
<input type="hidden" name="f03" value="" id="f03_0002" /></span>
</td>
<td headers="UPDUSER" class="data">
<label for="f04_0002" class="hideMe508">UPDUSER</label>
<input type="text" name="f04" size="16" maxlength="2000"
value="MOMSDAT" id="f04_0002" />
</td>
<td headers="DERIVED$01" class="data">MOMSDAT</td>
<td headers="UPDDATE" class="data">13-DEC-11
<label for="f02_0002" class="hideMe508">JOBNO</label>
<input type="hidden" name="f02" value="X111Y2222" id="f02_0002" />
<input type="hidden" id="fcs_0002" name="fcs"
value="DB31F7B9ED99E6A2F7295F6B7D236409">
<input type="hidden" id="frowid_0002" name="frowid"
value="AAATI3AAGAAAAIXAAo" />
<input type="hidden" id="fcud_0002" name="fcud" value="U" />
</td>
</tr>.....
<tr>.....</tr>
</table>
To help explain:
I have a checkbox associated with array name f03_NOSUBMIT,
This checkbox OnClick updates a hidden item associated with array name f03. The hidden item is linked to the depr column of my view/table (this functionality is straight from Oracle’s tabular checkbox wizard – works great, no problems).
When the check box is changed, I need to capture the APP_USER value in the UPDUSER field associated with the f04 array (nice that the array names matched up with your example :0} )
To do so, I created a dynamic action:
Name: Set_Upduser
Sequence: 10 (it’s the only DA)
Event: Change
Select Type: jQuery Selector
jQuery Selector: input[name=”f03_NOSUBMIT”]
--note: the event does not fire if I use f03
--since that value is not actually
--changed until submit with this
--method.
Condition: - No condition –
True Actions:
Sequence: 10
Action: Set Value
Fire When Event Result is: True
Fire On page Load: Unchecked
Stop Execution On Error: Checked
Set Type: JavaScript Expression
JavaScript Expression:
var row = $x_UpTill(this.triggeringElement, 'TR');
var otherElement = $('input[name="f04"]',row)[0];
otherElement.value = '&APP_USER.';
Selection type: jQuery Selector
jQuery Selector: input[name="f04"]
This ALMOST works...
When I run the page and click on just one check box, the UPDUSER fields are updated with the APP_USER for ALL the records, not just the row for the checkbox I clicked. And, if I submit the changes, ALL the records in the table now have the APP_USER in the UPDUSER column. Not just the column where the check box was changed (Which would be expected since all the values are changed in the form – hey, the submit part works :0} ).
Your example at http://apex.oracle.com/pls/apex/f?p=45448:11 works, setting the value for the target field only for that row. If I can get mine to work the same way, I will be good to go (as in hog-heaven, doing the Snoopy Supper-Time dance).
I am thinking my issue is with the row identification in the
--- var otherElement = $('input[name="f04"]',row)[0];
I seem to not be picking up the row value in the row var.
Am I reading line correctly where 'input[name="f04"]' is pNd, and row is pValue? Read the description of the $x_UpTill API, not sure how this is working to identify pValue (Row?).
Additionally, I am not sure what the [0] is for at the end of the otherElement var definition. I don’t see that listed with the $ JavaScript API parameters (Google wasn't much help there either).
OR, am I missing something else?
Once again, if you could:
1) let me know what might be different from your working example? (What does yours have that mine doesn’t)
2) Provide any info on how to get your working form downloaded at http://apex.oracle.com/pls/apex/f?p=45448:11. Please, please?
As always, your assistance is greatly appreciated!
Edited by: amckinne on Dec 27, 2011 5:29 PM
Edited by: amckinne on Dec 27, 2011 5:33 PM -
Can we have Manual Form and Tabular form in the same page..
Hi,
Is it possible to create a form manually with Save/Apply Change button and another Tabular form using wizard on the same page such that -
if we click the save button on the manulaly created form , it should save the data present in manual form as well as Tabular form...
Edited by: Apex_Noob on Mar 21, 2009 5:58 AMHi Dan,
My table structure is :
Process
process_id ( number primary key )
process_owner ( number which represent the user who is responsible for the process)
category_id ( number )
focus_area ( number )
frequency ( number )
process_description ( varchar2 )
Process Region
process_id ( number )
region_id ( number )
Process_website
id (number primary key)
process_id ( number)
web_address ( varcahr2 )
Above is the struct of part of my DB.
At present my manual form does the following :-
When users click on SAVE button , it run PAGE PROCESS , ADD_PROCESS
In ADD_PROCESS ,
I have following logic to insert into process table
Select seq.next_val into temp_variable from dual; - This is the process_id
insert into process values ( temp_variable , :p2_process_owner , :p2_cateogory , .... )
to insert into region i used the following logic ( Region is displyed as check box :p2_region north=1 , south=2 ,east = 3 and west = 4)
l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(:P2_REGION);
FOR z IN 1..l_vc_arr2.count LOOP
INSERT INTO "REGION" VALUES
( temp_variable ,
l_vc_arr2(z));
END LOOP;
END;Now as I told, I want to have three text field where user will enter web_address and it should be added to process_website table
Thanks a ton for all your help
Regards,
Shijesh
Edited by: Apex_Noob on Mar 21, 2009 10:07 AM -
Manual tabular form (Multiple Tabular forms)
Hi,
I am using APEX v4.0.
In my application, I am having a few issues with the generation of a manual tabular form. I need two tabular form on the page so I have created the first using a wizard and the second through the use of a collection using skillbuilders tutorial at http://www.skillbuilders.com/webinars/webinar.cfm/49?title=Manual%20Tabular%20Forms%20in%20Oracle%20APEX:%20A%20Methodology%20that%20Works
Independently, they work as expected i.e. if I have a condition on the 1st tabular form to never display and only display the 2nd, it works fine and vice versa. However, if I try to try to display them both, I am getting errors.
When both forms are displayed and I make a change to the form generated by the wizard, I am getting the error 'ORA-01403: no data found'.
When both forms are displayed and I make a change to the form I generated manually, I am getting the error 'ORA-01722: invalid number'.
Can someone please suggest where I should be looking as independently they are working fine, but when they are both on the page together, they are not.
ThanksHi Nicollette,
I have got a bit further with it now thanks. The wizard form is now working when BOTH forms are displayed. I am still having a few issues with the manual one. When I try to insert a record I am getting:
ORA-01410: invalid ROWID
Error
It is now letting me delete and update though.
I have the following as a before submit process:
DECLARE
l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
l_original_md5 VARCHAR2(32);
l_latest_md5 VARCHAR2(32);
BEGIN
l_collection_name := 'QC_COMPLAINT_MODELS';
FOR x IN 1 .. apex_application.g_f49.count
LOOP
IF apex_application.g_f10(x) IS NOT NULL --ID exists, check to see if record was updated
THEN
SELECT c048
INTO l_original_md5
FROM apex_collections
WHERE collection_name = l_collection_name
AND seq_id = apex_application.g_f49(x);
l_latest_md5 := wwv_flow_item.md5(
apex_application.g_f10(x),
apex_application.g_f11(x),
apex_application.g_f12(x),
apex_application.g_f13(x),
apex_application.g_f14(x)
IF l_original_md5 != l_latest_md5
THEN
apex_collection.update_member(
p_collection_name => l_collection_name,
p_seq => apex_application.g_f49(x),
p_c010 => apex_application.g_f10(x),
p_c011 => apex_application.g_f11(x),
p_c012 => apex_application.g_f12(x),
p_c013 => apex_application.g_f13(x),
p_c014 => apex_application.g_f14(x),
p_c047 => 'U',
p_c048 => apex_application.g_f48(x)
END IF;
ELSE --ID does not exist, must be new record
apex_collection.update_member(
p_collection_name => l_collection_name,
p_seq => apex_application.g_f49(x),
p_c010 => apex_application.g_f10(x),
p_c011 => apex_application.g_f11(x),
p_c012 => apex_application.g_f12(x),
p_c013 => apex_application.g_f13(x),
p_c014 => apex_application.g_f14(x),
p_c047 => 'U',
p_c048 => apex_application.g_f48(x)
END IF;
END LOOP;
IF :REQUEST = 'DELETE_MOD'
THEN
FOR x IN 1 .. apex_application.g_f50.count
LOOP
apex_collection.update_member_attribute(
p_collection_name => l_collection_name,
p_seq => apex_application.g_f50(x),
p_attr_number => '47',
p_attr_value => 'D'
END LOOP;
END IF;
END;and this as an after submit process:
DECLARE
l_table_md5 VARCHAR2(32);
l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
l_del_count PLS_INTEGER := 0;
l_upd_count PLS_INTEGER := 0;
l_ins_count PLS_INTEGER := 0;
l_success_message VARCHAR2(32767);
CURSOR op_lock_check_cur (
p_id IN NUMBER
IS
SELECT wwv_flow_item.md5(cm_id, serial_number, fd_number, complaint_id, model_name)
FROM XXMEL_QC_COMPLAINTS_MODELS
WHERE cm_id = op_lock_check_cur.p_id
FOR UPDATE;
BEGIN
l_collection_name := 'QC_COMPLAINT_MODELS';
FOR x IN (
SELECT *
FROM apex_collections
WHERE collection_name = l_collection_name
AND c047 IN ('N','U','D')
LOOP
IF x.c047 = 'N'
THEN
INSERT INTO XXMEL_QC_COMPLAINTS_MODELS(
cm_id,
serial_number,
fd_number,
complaint_id,
model_name
) VALUES (
XXMEL_QC_COMPLAINTS_MODELS_S.nextval,
x.c011,
x.c012,
x.c013,
x.c014
l_ins_count := l_ins_count + 1;
ELSIF x.c047 = 'U'
THEN
--Optimistic lock check
--MD5 should be identical to collection initialization proc
OPEN op_lock_check_cur(x.c010);
FETCH op_lock_check_cur INTO l_table_md5;
-- Compare the checksum values and if they are different, raise an error.
IF l_table_md5 != x.c048
THEN
raise_application_error(
-20001,
'Current version of data in database has changed '
|| 'since user initiated update process.'
END IF;
UPDATE XXMEL_QC_COMPLAINTS_MODELS
SET serial_number = x.c011,
fd_number = x.c012,
complaint_id = x.c013,
model_name = x.c014
WHERE CURRENT OF op_lock_check_cur;
CLOSE op_lock_check_cur;
l_upd_count := l_upd_count + 1;
ELSIF x.c047 = 'D'
THEN
DELETE FROM XXMEL_QC_COMPLAINTS_MODELS
WHERE cm_id = x.c010;
l_del_count := l_del_count + 1;
END IF;
END LOOP;
apex_collection.delete_collection(p_collection_name => l_collection_name);
l_success_message :=
l_ins_count || ' rows inserted, ' ||
l_upd_count || ' rows updated, ' ||
l_del_count || ' rows deleted';
:P8_SUCCESS_MESSAGES := l_success_message;
END;Thanks
Edited by: Cashy on 17-Oct-2012 02:12 -
Tabular Form Validation not working in tabular form APEX 4.0
Hi,
I am using APEX 4.0. I have a tabular form with Tabular form validation done with it.
Item not null is the validation.. so if I dont type any value in the any of the fields in the tabular form and press the Submit button, the first time error is shown... but when I click the Submit button again, with still the empty rows the page is submitted.
How to resolve this issue?
Edited by: Suzi on Oct 5, 2010 11:13 AMLook at this thread - Re: Validations of tabular forms in 4.0
-
Hello! How I can be on the same page with the same table insert and update operations using 2 different forms (single form and tabular form)
I have little knowledge of Apex, but I know PLSQL
Thanks
Ginger
EcuadorThank you Gramps. It took some time, but I've got it working now. I had to re-do all the user authentication actions from scratch for one of the databases, but it's finally behaving itself now. I appreciate you pointing me in the right direction.
-
How to use group by in tabular form
Hi all
i have a tabular form and i need to issue the goods not more then five and in 1 row i will issue only 1 qty
so i use only five rows . but by mistake i will use 6 rows then it is wrong how to restrict it
please guide
Thanks and Regards
vikasHi Ammad Ahmed
i have a order of dresses
Dress name qty
a 5
b 8
c 55
d 8
now i issuing it for production
and the issuing form is tabular and the way of issuing is like this
dress name qty
a 1
a 1
b 1
a 1
a 1
a 1
d 1
d 1
i need when i issue for production then i need to calculate the a,b and d are not more then the orderThanks and Regards
Vikas Singhal
Edited by: vikas singhal on Jan 14, 2011 3:46 PM -
Viewing complete employee information in the tabular form.....
Hi all ...
I have been asked by management to design a form in which they can view the following information of all the employees in a tabular form... STAFFNO,NAME,TYPE,NATIONALITY,POSITION,LOCATION,EVALUATION,APPROVAL NUMBER,... this info was previously available in MS-ACCESS now they want in oracle i forms..after the desiging of forms using the datablock wizard how hsould i proceed such that when i run my forms all the abv information of 800 employees are dispalyed.....page1-Welcome to data block wizard
page2-Table or View, stored procedure.... I select table or view
page3-i select the appropriate table... and the database item
page4-congratulation u have decsribed ur DB
page5-welcome to layout wizard
page6-canvas:new canvas
type:content
page7-select the items to be displayed
Item Type:text Item
page8-prompt width and height
page9-select form or tabular.......i select tabular
page10-frame title:HD
record displayed:10 & click on display scroll bar
page 11_congrats
page12-the form is displayed
now when i run it.... i dont c the information displayed instead i c the fields for the items to entered and saved....!!!!!! -
TABULAR FORM UPDATE ERROR CURRENT VERSION OF DATA IN DB HAS CHANGED...!
Hi all Experts on Apex 423 and Oracle xe 11g r2...
I'm getting a systematic error when updating a Apex Tabular form : the Oracle internal engine complaining that the row ID's are out of syncr? I'm use ROWID instead of ID ( trigger has been created but I think should not used ...!)
Any advise.
remark: The SIMPLE DATA APPLICATION has the same issue when trying to update the QUANTITY field on ORDERS... STRANGE NOT?
MFOConsulting Switzerland
[email protected]Hi All Apex Experts,
Détails with Détails records in a TABULAR FORM .
I tranformed this program Master-Détails with Détails records in FORM ( not tabular) and this error message is no more displayed on the screen.!!
CONCLUSION: there is a SERIUOS BUG in Apex 423.00.08 and 424.00.008!!
I hope that People in Oracle Corporation is working on this bug. and the next release of Apex 5.0 will correct it.
PS: The SIMPLE DATA BASE installed with any version of Apex... display this MSg .( update ORDERS quantity of items and you recieve thiS fanny message!
MFOConsulting Switzerland -
Tabular form region and preserving state
Hi all,
I have a tabular form region (one of a few form regions) on my page... I'm trying to figure out how to preserve the other fields on the page (detail form), when tabular form buttons are clicked to add, update or delete rows.
The page obviously branches back to itself, but if a user has inputted changes in other form items on the page, they are lost.
I know it has something to do with how the item sources are derived... currently, they are tied to the database column, and the source is derived each and every time..
If I set it so it checks session state first, and if not null, get it from there, it'll work for the above use case. However, it causes problems if the user leaves the page by clicking elsewhere (ie back to master list), and decides to edit a different row... the detail form will pull the content from session state, and not from the db, and display the wrong information...
Hope this is clear enough... I appreciate your feedback
Thanks
Message was edited by:
pl_sequelThanks for the reply...
I guess it is that simple... as long as I ensure that any link pointing to the detail form (ie edit, or view etc...) clears the page's cache, then I am guaranteed to have the database state and not the session state displayed...
My detail form items should then derive their source always from session state if not null, otherwise get the source from the DB...
This will ensure that when I branch back to the page when adding a row to my tabular form for instance, what was entered previously, would remain...
Thanks for the tip... -
ORDS v3 and APEX tabular form issue
Hi,
We encountered strange issue after installing ORDS v3 EA to test, thought I would report this. I'm not sure if its a bug but it seems to be reproducible in our instance.
Steps:
1) Install ORDS v3 with Glassfish deployment.
2) Go to APEX builder -> Page with report (classic or interactive) -> Edit Attributes -> Change data in column attempt to save throws out "ORA-01403: no data found"
or
3) Create APEX app -> Build page with DML form and Tabular form -> Edit tabular form attempt to save throws out same error.
Application error logs shows:
ORA-20987: APEX - Unable to change column attributes. - ORA-01403: no data found
WWV_FLOW_SECURITY
FINAL_EXCEPTION_HANDLER
Also, I was unable to get RESTFul services working with APEX no matter how I configured ORDS v3. I don't encounter these issues when reverting back to version 1.x , 2.x
APEX Version: 4.2.6.00.03
Oracle DB: 11.2.0.3.0
Glassfish : open source edition 4.1
Regards,
-SenthilI too am getting ORA-01403 both when trying to save in the builder and when just hitting submit on the tabular form when using standalone EA3. Happens when pointing at 4.1 or 4.2.6. The v2 listeners works fine when pointing to the same applications/pages.
I asked oracle support whether it is a known EA3 issue but was told to add my observations to the forum.
cheers
~t -
How to add more than one tabular region in a page?...
How to add more than one tabular region in a page?
i have a page, that page contain form and tabular region. when i trying to add another tabular region it showing error
1 error has occurred
Updatable SQL Query already exists on page 2. You can only add one updatable SQL query per page. Select a different page.
but i have to add the tabular in that page.
Is it possible?
pls help...
Thanks and regards,
skudhi,
even i am searching for some thing similar.
i want to have 3 calendars in one page.
getting same message calendar already exists on page 2. You can only add one calander per page. Select a different page.
pls help. -
Can we create an APEX Form based on Table which has no Primary Key
Hi,
I have a requirement.
I need to create a FORM based on a table having no Primary Key but it is having Unique Key . I can use Unique Key as an alternate of Primary Key.
but When I tried to create a Form, I got the following message.
Source tables for forms and tabular forms must have a primary key
Thanks,
DeepakDeepak_J wrote:
Hi,
I have a requirement.
I need to create a FORM based on a table having no Primary Key but it is having Unique Key . I can use Unique Key as an alternate of Primary Key.
but When I tried to create a Form, I got the following message.
Source tables for forms and tabular forms must have a primary key
Thanks,
DeepakGood database design will always require a PK on the tables. There are only very few and rare expetions to this rule. One would be when you have store the data only temporarily in this table, like it is often done for import/loader tables. The data is first loaded in the "import"-table, then validated and then transported to the "real" tables. In such a scenario you can ignore the primary key on purpose. Because you already have a UK on this table it can't be such a scenario.
For most other scenarios you should always add a PK. Ask critically why there is no PK on it. Is there a reason for it or was the table designer just not doing its job well?
Btw: A UK is identical to a PK if the column is mandatory (NOT NULL). In this case you could simply change the constraint from UK to PK. -
Content Canvas not displaying when form entered
I have a form that has not been updated since 2009. Some time between then and now the key block has stopped displaying when the form is entered. I can get it to display if I do the previous item key. I have tried setting the Raise on Entry to Yes but that did not work. Any thoughts on what might be the issue would be appreciated.
Thanks,
MikeThe KEY_BLOCK has 2 navigable fields and a display only field. When I bring up the form, the tabular block is showing but the Key_Block is not. I navigate backwards into the last field in the key_block and that is when the block becomes visible. It does not stay visible at all times after I see it for the first time. I have not mapped out the exact circumstances where it disappears again. This seems to have become a problem after we moved to 11g. Any thoughts?
Thanks,
Mike
Maybe you are looking for
-
Cannot sync, error message "could not be read" for an iPod no longer in use
I have two problems. I upgraded iTunes to 7.2 and the very next morning my iPod died. It is completely unresponsive. Maybe it's coincidental. So I bought a new 80 gig iPod and gave it a different name than the old dead iPod. Now when I try to sync th
-
Error when starting Bex analyzer
Hi All! We have a world wide BW-SEM application. In one country they get the following error message when starting Bex analyzer: <install error> Missing ActiveX component: Business Explorer Global Services Does anyone have a hint on what to do? Thank
-
Can't get my iphone 4s to work
i can't get my iphone 4s to work. Message came up with 'sorry, you've not been given access to this service' when i try to make a call
-
I uninstalled photoshop CS6 using Perfect Uninstaller and suddenly my Reader gone as well. No idea why would this happen so I guess the only way was to reinstall.. However installation was not successful: 'This product is already installed. Error cod
-
Trouble downloading (HOW TO UPDATE THE INSPIRATION BROWSER)
I have Photoshop Elements 10. Iwent into Start Menu, selected Control Panel (as directed) In the Programs category: I selected uninstall a program. I selected Adobe Photoshop.com - Inspiration Browser & uninstalled. I clicked the button to downl