Loop through all items in all data blocks?
Is there a way to loop through every item in every data block and set the property of a format mask?
I do not know what error it is, only that an on-error trigger fires.
I found out one thing I was definitely doing wrong, using nextblock, nextitem properties at the wrong level.
DECLARE
v_firstblock VARCHAR2(50);
v_currentblock VARCHAR2(50);
v_firstitem VARCHAR2(50);
v_currentitem VARCHAR2(50);
v_counter NUMBER :=0;
v_counter2 NUMBER :=0;
begin
v_firstblock := get_form_property(:System.Current_Form,first_block);
v_currentblock:= get_block_property(v_firstblock,nextblock);
MESSAGE(v_firstblock||v_currentblock);
LOOP
v_counter := v_counter +1;
IF (v_counter >10) THEN
exit;
END IF;
IF (v_currentblock = v_firstblock) THEN
exit;
ELSE
v_firstitem := get_block_property(v_firstblock,first_item);
IF (lower(GET_ITEM_PROPERTY(v_firstitem,format_mask))=lower('mm-dd-yyyy')) THEN
SET_ITEM_PROPERTY(v_firstitem,format_mask,'DD-MON-YYYY');
END IF;
v_currentitem := get_block_property(v_firstblock,first_item);
v_currentblock:= get_block_property(v_currentblock,nextblock);
GO_BLOCK(v_currentblock);
LOOP
v_counter2 := v_counter2 +1;
IF (v_counter2>15) THEN
exit;
END IF;
v_currentitem:= get_item_property(v_currentitem,nextitem);
MESSAGE(v_counter||v_firstblock||v_currentblock||v_firstitem||v_currentitem||v_counter2);
IF (v_currentitem <> v_firstitem) THEN
IF (lower(GET_ITEM_PROPERTY(v_currentitem,format_mask))=lower('mm-dd-yyyy')) THEN
SET_ITEM_PROPERTY(v_currentitem,format_mask,'DD-MON-YYYY');
END IF;
ELSE
exit;
END IF;
END LOOP;
END IF;
END LOOP;
end;Here is updated new code. I am currently trying to debug it, it has crashed my form on the server when tied to a button press.
EDIT: So far I have found that it infinitely loops through the first 3 items and a null item in the first block. Still looking into why...
EDIT: Some code changes to temporarily stop infinite loop and make v_currentblock actually change. Still loops through same 3 items in the first data block even though v_currentblock changes.
Edited by: 878576 on Oct 21, 2011 12:46 PM
Similar Messages
-
Looping through all the Nodes at any Particular Level Specified
Dear Forum Members,
I have an XML File in the database in a Column of type XMLTYPE.
The Format is given below
<XML-SSDFILELIST>
<Training>
<BRKCD_STMNSWTINVIN_C Key="6707">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</BRKCD_STMNSWTINVIN_C>
<BRKCD_STREDSWTINVIN_C Key="6708">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</BRKCD_STREDSWTINVIN_C>
<VSACD_TIPER_C Key="7285">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSACD_TIPER_C>
<VSSCD_NTHRESPLA_C Key="6266">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_NTHRESPLA_C>
<VSSCD_QTHRESPLA_C Key="6267">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_QTHRESPLA_C>
<VSSCD_VDFL_C Key="6269">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_VDFL_C>
<VSSCD_VMAX_C Key="6270">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_VMAX_C>
<VSSCD_VMIN_C Key="6271">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_VMIN_C>
<VSSCD_VTHRESPLA_C Key="6272">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_VTHRESPLA_C>
</Training>
</XML-SSDFILELIST>
Is there any way I can Loop through all the Child records at 3rd Level(Bolded Level in the File).
Regards
Madhu.check this blog,
http://www.oracleappshub.com/11i/oracleapps-responsibility-vs-sap-functions/
Re: How to change OM responsibility as read-only in oracle applications 11i
read only responsibility-user -
Loop through all controls in view
Hi Everyone,
I need to cycle through all the controls on a view.
I have set each of the controls of type UISegmentedControl with a unique tag number.
I am using this tag number to perform a lookup in database for the value of the segmented control.
So, my question is this.... how do i cycle through all the controls on a view?
thank you
take care
tonyalt-088 wrote:
I think we are close - just one correction.
The segmented controls are all at design time, there will be no new controls added.
I'm not clear on what's been corrected. The sample code I gave you assumed all the controls were known at compile time. So I think the example code addressed the problem you're trying to solve. The last paragraph of that post was just an afterthought, to explain what to do in case you ever needed to add controls dynamically.
-> loop through all controls on view
-> if control is of type uisegmentdcontrol
then do database lookup on tag
Set segment value to value returned from database
Once again, if I correctly understand the above, the code I gave you does exactly what you want. You haven't indicated you want to take any action when a control is not a segmented control, so I don't see why you'd want to include them in the loop. However, if you actually do need to enumerate non-segmented controls (or other subviews), my last response advised you to set the tag properties of all those other controls, making sure the range of those tags is different from the range of the seg control tags.
The part that eludes me is the looping through all the controls on the view
I guess the part that eludes me is why you're so interested in enumerating all the controls, when you only seem to be interested in the segmented controls. But even if you really do need to look at every control, I don't see why you're rejecting the solution I gave you. [viewWithTag:|http://developer.apple.com/iphone/library/documentation/UIKit/Ref erence/UIViewClass/UIView/UIView.html#//appleref/doc/uid/TP40006816-CH3-SW26] is a powerful method which recursively walks the entire view hierarchy to find whatever tag it's looking for. If you use it correctly (e.g. by assigning unique tag numbers that tell you what type of control you've found), it will save you lots of trouble.
If, for some reason, you insist on doing this job without using viewWithTag, the next best might be something like this:
- (void)doSomethingWithEachSegCtrlInView:(UIView *theView) {
UIView *subView;
for (subView in theView.subviews) {
if ([subView respondsToSelector:@selector(selectedSegmentIndex)]) {
// subView is a segmented control ...
else {
// subView is not a segmented control ...
if ([subView.subviews count]) {
// this subview has its own subviews
[self doSomethingWithEachSegCtrlInView:subView];
Note that the above is a more difficult, more error prone method than the sample in my first response. Firstly, it needs to recurse in case any controls are placed on subviews of the main view (or on subviews of those subviews, etc.), a capability already built into viewWithTag. Secondly it needs to identify the type of each subview object. [respondsToSelector:|http://developer.apple.com/iphone/library/documentation/Co coa/Reference/Foundation/Protocols/NSObjectProtocol/Reference/NSObject.html#//appleref/occ/intfm/NSObject/respondsToSelector:] is the preferred way of identifying the class of an object, especially when the selector argument represents one of the methods you intend to use. However there's no reason to get into the business of identifying the class of an object, when you could have given that object a unique tag number in the xib, where there was no question about its class.
Hope the above communicates the solution better than my first response!
- Ray -
Loop through all layers and sublayers
is there a way that I can loop through all layers and sublayers looking for a name of a layer? I have one that loops through only top level layers. I am thinking I have to somehow incorperate all pathItems, groupItems and the like to incorperate all types of "layers" there might be, since a group is technically not a layer but a groupItem.
this is what I am doing so far:
for (var i = 0; i < numberOfLayers; i++) {
var customName = "div structure";
var myLayer = app.activeDocument.layers[i];
var myLayer = myLayer.name;
alert(myLayer);
//alert (myLayer);
if (customName == myLayer) {
alert("layer matches");
else { break; }
any ideas?Sorry I don't understand what it is you are trying to achieve… Most collections offer a getByName() method if you know what you are looking for eg…
doc.layers.getByName( 'fluff' );
This should return you the first found or error so you need to try & catch when using this… -
I was wondering how I can loop through all records in a database?
I'm using a do while loop to loop through all the records in a database is there a way I can simulate to EOF. I tried something to simulate it but I don't think it'll work. I assume there's a better way.
Here's my code:
boolean noRecords=false;
do
noRecords=false;
if (queryResults.next())
serverOutput.print(queryResults.getInt("itemID");
serverOutput.println(queryResults.getString("itemName");
else
noRecords=true;
}while(noRecords==false);i think i know what you mean...
try this
while (queryResults.next()) {
serverOutput.print(queryResults.getInt("itemID");
serverOutput.println(queryResults.getString("itemName");
when .next() returns false, it will exit the while loop. you don't need the other code you have there, the above should do it all.
is that what you're after? -
Script code sample for looping through the records from xml data file in formCalc script
Hi
I have a xml data file which contains a sequence of repeating applicant data like given below
US
II
CEO
Mr
111111111
0000000111
GuarantorA
111
IN
11111
WILLIAMS1
R3
KENNETH1
City1GU
PA
1934-03-14
[email protected]
GU
R
113 Lazlo LaneCA
Suite 3500CA
OaklandCA
TX
11345
AL
I want to assign a textfield with a value based on the value of coap_flag.
So i need to loop through all the record and check the value of coap_flag and then assign the textfield a value based on that.
I am new to Adobe livecycle...Please help me how it can be done.
I have developed something like this
foreach Item in ($record.applicant[*].coap_flag) do
test.value=Item
if(test.value=="MA")then
concat($record.applicant.first_name,$record.applicant.middle_name)endif
endforUsing the data you posted in the forum, I copied it a couple of times to give multiple records and used this code to extract the different values that you wanted. I had to wrap it in a <root> node that I called root (to make it valid XML). In my case I wrote the extracted values to a field, but in your case you can do whatever you want with them. Note that this was done in javascript:<br /><br />var currentElement;<br />var obj;<br /><br />//Get the nodes below the root node in the dataDom<br />obj = xfa.datasets.data.root.nodes;<br /><br />//Set an initial value for the textField<br />TextField1.rawValue = "The values of the coap_flag are: ";<br /><br />//Loop through the nodes in the obj set <br />for (i=0; i< obj.length ; i++){<br /> //set the currentElement to the 1st child node<br /> currentElement = obj.item(i);<br /> //Check to see if it is an applicant node<br /> if (currentElement.name == "applicant"){<br /> //It is an applican, now find the coap_flag node value and write it to the text field<br /> TextField1.rawValue += "\n" + xfa.resolveNode("xfa.datasets.data.root.applicant[" + i + "]").coap_flag.value;<br /> }<br />}
-
Loop through the records from xml data file in formCalc script
Hi
I have a xml data file which contains a sequence of repeating applicant data like given below
US
II
CEO
Mr
111111111
0000000111
GuarantorA
111
IN
11111
WILLIAMS1
R3
KENNETH1
City1GU
PA
1934-03-14
[email protected]
GU
R
113 Lazlo LaneCA
Suite 3500CA
OaklandCA
TX
11345
AL
I want to assign a textfield with a value based on the value of coap_flag.
So i need to loop through all the record and check the value of coap_flag and then assign the textfield a value based on that.
I am new to Adobe livecycle...Please help me how it can be done.
I have developed something like this
foreach Item in ($record.applicant[*].coap_flag) do
test.value=Item
if(test.value=="MA")then
concat($record.applicant.first_name,$record.applicant.middle_name)endif
endforUsing the data you posted in the forum, I copied it a couple of times to give multiple records and used this code to extract the different values that you wanted. I had to wrap it in a <root> node that I called root (to make it valid XML). In my case I wrote the extracted values to a field, but in your case you can do whatever you want with them. Note that this was done in javascript:<br /><br />var currentElement;<br />var obj;<br /><br />//Get the nodes below the root node in the dataDom<br />obj = xfa.datasets.data.root.nodes;<br /><br />//Set an initial value for the textField<br />TextField1.rawValue = "The values of the coap_flag are: ";<br /><br />//Loop through the nodes in the obj set <br />for (i=0; i< obj.length ; i++){<br /> //set the currentElement to the 1st child node<br /> currentElement = obj.item(i);<br /> //Check to see if it is an applicant node<br /> if (currentElement.name == "applicant"){<br /> //It is an applican, now find the coap_flag node value and write it to the text field<br /> TextField1.rawValue += "\n" + xfa.resolveNode("xfa.datasets.data.root.applicant[" + i + "]").coap_flag.value;<br /> }<br />}
-
I can not put the data of a field(LONG RAW) consulted into a item of a data block
I want to query a field that is LONG RAW(it's a image) and put the data into a item of a data block (in Forms Builder), when i write ":BLOCK.FOTO:=vfoto" i recieve this errors: "bad bind variable ....". How can i put the data of field of my DB and put the data in a item of a data block(in Forms Builder)?.
I can store a image in a table of my DB, but i want to query a image stored in my DB and put it into anothers table, all this on FORMS BUILDER.You have to base the image item on a base table and use EXECUTE_QUERY on that block. You can't do a direct select in PL/SQL into the item
-
Help looping through page items
Hello,
I'm new to InDesign scripting and I need a way to programmatically loop through the items on a page of a document and get all of the text frame IDs (Using javascript). Once I find a match of the text frame I am looking for, I will need to update its contents. Is there an easy way to do this?
Thanks in advance!
- LloydHey!
var myTextFrames = app.activeDocument.textFrames;
var myTextFramesNo = myTextFrames.length;
Now myTextFramesNo holds number of text frames in document and myTextFrames holds text frame objects. Now you can run through text frames and set contents for each of them like this:
myTextFrames[0].contents = "My Frame Contents";
That's for start
tomaxxi
http://indisnip.wordpress.com/ -
Can we create a list item as a data block item?
Hi,
I have changed a text item to list item on the data block.
This list item used to get populated when it was control block item, but after i changed it to data block item, it's not getting populated.
My question is, can we create a list item(poplist) as a data block item?
Any idea?
Thanks in advance
R.GHi
When you use ctl blocks data dose not fetch from Database. But in data blocks it get fetches when you execute query. So you have to make sure table column values are matching with the List Box values you have given.
So please check table values.
Nilaksha. -
How to loop through a single row of data?
What I'm trying to do is use a cursor to loop through a clob. When I create my cursor I get the an error telling me that the table does not exist. Which implies that I have an implicit cursor. Is there a way to get around this?
> How to loop through a single row of data?
By not looping as there is only a single row?
> What I'm trying to do is use a cursor to loop through a clob
Processing (looping through) a CLOB has nothing to do with a cursor.
> When I create my cursor I get the an error telling me that the table does
not exist. Which implies that I have an implicit cursor.
Incorrect. It simply means that
a) you do not have permissions to access that table from within the current context
b) it does not exist (e.g. you have misspelled the object name, you have not qualified it properly within the current scope, etc) -
Hi,
Needed your inputs on approach to implement a job using dbms_scheduler.
We have around 2000 schemas. Each schema has a package with 2 procedures.
The requirement is to create a single job in SYS that would loop through each schema and run the procedures at a specific time ( once a day) and send email notification on success or failure.
Job script:
BEGIN
dbms_scheduler.create_job( job_name=> 'LOAD_EACH_SCHEMA_AUDIT_DATA',
job_type=>'PLSQL_BLOCK',
job_action=>'BEGIN sys.p_loadaudit;
END;',
start_date=>systimestamp,
repeat_interval=>'FREQ=MINUTELY;INTERVAL=1',
number_of_arguments=>0,
enabled=> true,
comments=>'Job repeat interval is every 5 mins' );
END;
Note: for testing purpose i have set repeat interval to minutely.
Procedure job will be executing:
Procedure sys.p_loadaudit:
CREATE OR REPLACE
PROCEDURE p_loadaudit
AS
v_count NUMBER:= 0;
lv_error_message VARCHAR2(4000);
vstmt VARCHAR2(4000);
BEGIN
FOR i IN
( SELECT username FROM dba_users WHERE username LIKE 'ABCFIRM%'
LOOP
vstmt:= 'begin ' || i.username || '.pkg_audit_info.p_load_coa; end;';
EXECUTE immediate vstmt;
vstmt:= 'begin ' || i.username || '.pkg_audit_info.p_load_am; end;';
EXECUTE immediate vstmt;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
lv_error_message := 'Error in procedure p_loadaudit: ' || SQLCODE || ' -ERROR- ' || SUBSTR(
sqlerrm,1,300) || '*' || dbms_utility.format_error_backtrace;
raise_application_error(-20002,lv_error_message);
END p_loadaudit;
Example of one schema: SCHEMA_01
create or replace
PACKAGE pkg_audit_info
AS
type cursortype
IS
ref
CURSOR;
PROCEDURE p_load_COA;
PROCEDURE p_load_AM;
END pkg_audit_info;
create or replace
PACKAGE body pkg_audit_info
AS
PROCEDURE p_load_COA
AS
BEGIN
INSERT INTO TABLE1();
EXCEPTION
WHEN OTHERS THEN
lv_error_message := 'Error in procedure pkg_audit_info.p_load_COA: ' || SQLCODE
|| ' -ERROR- ' || SUBSTR(SQLERRM,1,300) || '*' || dbms_utility.format_error_backtrace;
RAISE_application_error(-20002,lv_error_message);
END p_load_COA;
PROCEDURE p_load_AM
AS
BEGIN
INSERT INTO TABLE2();
EXCEPTION
WHEN OTHERS THEN
lv_error_message := 'Error in procedure pkg_audit_info.p_load_AM: ' || SQLCODE ||
' -ERROR- ' || SUBSTR(SQLERRM,1,300) || '*' || dbms_utility.format_error_backtrace;
RAISE_application_error(-20002,lv_error_message);
END p_load_AM;
END pkg_audit_info;
Table1 and table1 exist in schema_01.
All 2000 schemas have same package.procedures.
Due to security reasons i have removed the actual code.
I was able to execute the job successfully. However, when a schema procedure (SCHEMA_01.pkg_audit_info.p_load_COA) throws an exception, the job fails and all transaction is rolled back.
Is there a way to loop through each schema and execute the related procedures. Even if exception happens, it should rollback only for that schema and continue the other schemas in the loop?
Please let me know if there is a better way to achieve this. Is the way i am handling exceptions in the job/procedure correct?
ThanksHi,
RAISE_APPLICATION_ERROR will cause the program to exit back to the caller, even if you place it in a block within the loop, so the RAISE or RAISE_APPLICATION_ERROR instruction should be placed in your "pkg_audit_info.p_load_AM" and "pkg_audit_info.p_load_coa" procedures. This way, you can use a block inside the loop and log the error.
FOR i IN
( SELECT username FROM dba_users WHERE username LIKE 'ABCFIRM%'
LOOP
BEGIN
vstmt:= 'begin ' || i.username || '.pkg_audit_info.p_load_coa; end;';
EXECUTE immediate vstmt;
vstmt:= 'begin ' || i.username || '.pkg_audit_info.p_load_am; end;';
EXECUTE immediate vstmt;
EXCEPTION
WHEN OTHERS THEN
--> Log the error in a custom log table otherwise you will not know what happened for that schema: don't forget the username
END;
END LOOP; -
Loop through all fields in a (2 page) form?
Is it possible to do it in one go?
suppose you have fields in 2 pages.. (2 subforms)
would you have to write a script that would check for all fields in page 1
and another to check for all fields in subform 2?
or can you just loop through the parent of the 2 subforms?.. (the aim would be to check that all required fields have been filled in or are not equal to their default value)
thank you in advanceYou can certainly write a script that'll find all fields on all pages and perform some action on them.
I've included a sample form which contains two pages with fields on them. At the top of the first page, there's a "Find Fields" button which, when pressed, populates the list box next to it with the names of each field found across all pages. Clicking on an item in the list box will then set focus to that field.
The script uses a recursive function called GetFieldNames in a Script Object called "Utils". In the function, lines 21 - 25 are as follows:
else if (oNode.className == "field")
// oNode is a field
sFieldNames += (sFieldNames.length > 0 ? "\n" : "") + oNode.name;
If you wanted to verify that all mandatory fields were filled, you could change them to this:
else if (oNode.className == "field")
// oNode is a field
if (oNode.mandatory == "error" && (oNode.rawValue == null || oNode.rawValue.length == 0))
sFieldNames += (sFieldNames.length > 0 ? "\n" : "") + oNode.name;
That would find only fields that are required and haven't been filled accross all pages.
Stefan
Adobe Systems -
For-looping Through All textFrames (cs4 jsx)
var docRef = app.activeDocument;
for (var num=0; num<docRef.textFrame.length; num++){
alert( docRef.textFrames[num] );
I would like to for through all of the text frames in a document to experiment with what properties return what information. I have a simple test document with like three different text frames, and I want to collect info on each one. This for loop doesn't seem to work though, and I can't quite wrap my head around how the textFrame and textFrames objects work.
Thanks for the assistance!textFrames = a collection of textFrames
textFrame = a single textFrame, for example textFrames[1] refers to the second textFrame
try this
var docRef = app.activeDocument;
for (var num=0; num<docRef.textFrames.length; num++){ // you were missing an s
alert( docRef.textFrames[num]); // returns the object itself
alert( docRef.textFrames[num].contents ); // returns a property (contents) of the object -
I can't seem to remember but what is the library or tool in Oracle Forms that allows you to export the entire data block of records to a file (i.e. csv)? Instead of using TEXT_IO to write one record at a time, there was one to do the whole block.
GioThe only thing I can think of is using the webutil library to either use CLIENT_TEXT_IO, or you can use the CLIENT_OLE2 functions to control the client-side applications and move your records over.
Regards,
Jordan
Maybe you are looking for
-
File Receiver Adapter Empty Lines
High Experts I have a scenario Proxy->PI->Flate file. My problem is, there is an empty line at the beginning and at the end of the generated file. I am doing Content Conversion with the following parameters: LineItem.fieldSeparator '~' LineItem.f
-
Hi, I have Oracle 10g XE and Oracle Dev Suite installed on my computer. I want to connect to 10g XE via SQL Plus or from within Forms Builder but I don't know what to specify for Host String (in SQL Plus) or Database (in Forms Builder). "XE" doesn't
-
Hi Team, My customer is looking to target12 kbps for an ICMP IP SLA probe. What would be the values required for the frequency, interval, # of frames and payload to achieve this. Frequency (or period of measurement): Interval between packets: # of f
-
Why is developer exchange not working for me?
My developer exchange has not been working recently? In fact, I doubt this will even be posted. Any help?
-
Dear SAP Gurus, I have created sales order with 20 items.In that some items are assigned to delivery group "0" and some items are assinged "2" and the remaining items "3".These are maintained manually in the sales order.All items have same ship to pa