Treatment of the values not defined forms
I have a form with 50 frames.
Sometimes when my users submit it form, if the field value is equal to zero, completely remove the input area.
For example, when the form is submitted, and they get to the processing page. the value of form field for the field they deleted is «»
This causes problems as the value of the form is "", where it should be 0.00
I'm CFPARAM to the processing page. But I guess that, given that the value is set ("'") they are not used.
Is there a way for treatment in the form of code page so that if one of the fields of the form are "" they have by default a value of 0.00?
Pat
You could do it in a loop and | or a function.
I.E.
You may need to change this there are some areas that you don't want to test this way.
Tags: ColdFusion
Similar Questions
-
Hello
I tried something with the processing of the forms which doesn't seem to work. I wonder if the function really works or if I'm doing something wrong.
Here is an example of what I do: I have a form that I want to use. I add "Web Page redirection" processing step to my form. When I click on the processing step to set up, under "General settings" there is an option that says "Choose how the launch of destination page is selected." In this drop-down menu, there are three options: always redirect to the same landing page, use a drop-down list to select the landing page and the value of a form field allows you to select the destination page. I have a hidden field on the form that contains the URL of the web page to which I would like to redirect. When I select 'Use the value of a form field to select the landing page', I select the hidden field to the field that contains the URL of the web page to which I want to redirect. It's my setup. However, when I submit the form, nothing happens, I do not redirect to the URL contained in the hidden field... This function still works? I'm doing something wrong? I can't seem to get the function "Use a drop-down list to select the destination page" to work either. The same thing happens when I try to use the "Add Contact to shared the list" processing step. I add the name of the list that is shared in the field hidden, but the contact does not appear in the shared list... These functions still work? If yes how do I configure them?
Thank you!
Well, I understood the problem of the shared list... You must add the ID of the list shared in the hidden field. I had to use Firebug to see the real ID of the shared list. Once you have the ID, use you it as a static value in the field. If the HTML code of the form will look something like this:
If you do not use the lookup data ID. You use the ID real asset on the shared list. You must use something like Firebug to find.
I'm glad everything is working.
-
Show only the value not save to the database based on the dynamic action
Nice day
I have a select box with products and dynamic action that updates a single display element with the price, based on the selection of products.
Once the selection is made and the page is submitted, I noticed that the price is not stored in the database. If I change the display
only the value of a text box, the data is saved. This is expected behavior? If so, can I add something to the text box to make it uneditable?
Thanks for any help you can provide.
Version is Application Express 4.1.1.00.23
Stevestmontgo wrote:
Hello
Thanks for your advice. I changed the STATE of SESSION SAVE Yes with the other values remains the same, as they met to your recommendations.
When I change the value, I get the error below. It's maybe because the value is taken from a dynamic action?Yes. That would mean there isn't an item "view only". The value is changed by the browser.
You might change view as textitem and set read-only by adding the ReadOnly attribute to the property attributes of HTML form elements .
-
Get the error not defined for the current document in the script
I get a "error number: 2" "error string: myDoc is not defined" in my script.
I modified a few scripts so that they cross my entire book and open each section (document) in my book, and run the code for each section.ext
The code runs great and opens and closes the sections where it does not add links to text, but once, it opens a document and view text that you CAN add links, it generates this error. Here is my code:
main(); exit(); function main() { var myBook = app.activeBook, myDocs = myBook.bookContents.everyItem().getElements(), myDoc, myHyperlinkStyle, myCount = 0; for (var i=0; i< myDocs.length; i++) { myDoc = app.open(File("\\\\computerOnNetwork\\c$\\Folder\\" + myDocs[i].name)); myHyperlinkStyle = myDoc.characterStyles.item("linkstyle"); try { var script = app.activeScript; } catch(err) { var script = File(err.fileName); } var myScriptFolderPath = script.path; var myFindChangeFile = new File(myScriptFolderPath + "/SearchTextAndUrls.txt"); //mac path for users desktop //File.openDialog("Choose the file containing the tab separated list"); //alert(myFindChangeFile) myFindChangeFile = File(myFindChangeFile); var myResult = myFindChangeFile.open("r", undefined, undefined); if(myResult == true){ app.findTextPreferences = NothingEnum.nothing; app.changeTextPreferences = NothingEnum.nothing; //Loop through the find/change operations. do { //read 1 line into myLine myLine = myFindChangeFile.readln(); myFindChangeArray = myLine.split("\t"); //The first field in the line is the value to find myFindVal = myFindChangeArray[0]; // second is the url myFindUrl = myFindChangeArray[1]; doSearchAndReplace(myFindVal, myFindUrl, app.activeDocument); } while(myFindChangeFile.eof == false); myFindChangeFile.close(); // reset search app.findTextPreferences = NothingEnum.nothing; app.changeTextPreferences = NothingEnum.nothing; } alert("Done! " + myCount + " hyperlinks have been added."); myDoc.close(); } } function doSearchAndReplace(stringfind, urlstring, searchin) { app.findTextPreferences.findWhat = stringfind; //Set the find options. app.findChangeTextOptions.caseSensitive = false; app.findChangeTextOptions.includeFootnotes = false; app.findChangeTextOptions.includeHiddenLayers = false; app.findChangeTextOptions.includeLockedLayersForFind = false; app.findChangeTextOptions.includeLockedStoriesForFind = false; app.findChangeTextOptions.includeMasterPages = false; app.findChangeTextOptions.wholeWord = false; var myFoundItems = searchin.findText(); for (i = 0; i < myFoundItems.length; i++) { var myHyperlinkDestination = myMakeURLHyperlinkDestination(urlstring); myMakeHyperlink(myFoundItems[i], myHyperlinkDestination); myFoundItems[i].applyCharacterStyle(myHyperlinkStyle, false); myCount++ } } function myMakeHyperlink(myFoundItem, myHyperlinkDestination){ try { var myHyperlinkTextSource = myDoc.hyperlinkTextSources.add(myFoundItem); var myHyperlink = myDoc.hyperlinks.add(myHyperlinkTextSource, myHyperlinkDestination); myHyperlink.visible = false; } catch(myError){ } } function myMakeURLHyperlinkDestination(myURL){ //If the hyperlink destination already exists, use it; //if it doesn't, then create it. try{ var myHyperlinkDestination = myDoc.hyperlinkURLDestinations.item(myURL); myHyperlinkDestination.name; } catch(myError){ myHyperlinkDestination = myDoc.hyperlinkURLDestinations.add(myURL); } myHyperlinkDestination.name = myURL; //Set other hyperlink properties here, if necessary. return myHyperlinkDestination; }
Any help is greatly appreciated!
That ends up being my fixed/final code:
main(); exit(); function main() { var myBook = app.activeBook, myDocs = myBook.bookContents.everyItem().getElements(), myDoc, myHyperlinkStyle; for (var i=0; i< myDocs.length; i++) { myDoc = app.open(File("\\\\computerOnNetwork\\c$\\Folder\\" + myDocs[i].name)); myHyperlinkStyle = myDoc.characterStyles.item("linkstyle"); try { var script = app.activeScript; } catch(err) { var script = File(err.fileName); } var myScriptFolderPath = script.path; var myFindChangeFile = new File(myScriptFolderPath + "/SearchTextAndUrls.txt"); //mac path for users desktop //File.openDialog("Choose the file containing the tab separated list"); //alert(myFindChangeFile) myFindChangeFile = File(myFindChangeFile); var myResult = myFindChangeFile.open("r", undefined, undefined); if(myResult == true){ app.findTextPreferences = NothingEnum.nothing; app.changeTextPreferences = NothingEnum.nothing; //Loop through the find/change operations. do { //read 1 line into myLine myLine = myFindChangeFile.readln(); myFindChangeArray = myLine.split("\t"); //The first field in the line is the value to find myFindVal = myFindChangeArray[0]; // second is the url myFindUrl = myFindChangeArray[1]; doSearchAndReplace(myFindVal, myFindUrl, app.activeDocument, myDoc, myHyperlinkStyle); } while(myFindChangeFile.eof == false); myFindChangeFile.close(); // reset search app.findTextPreferences = NothingEnum.nothing; app.changeTextPreferences = NothingEnum.nothing; } alert("Done! Hyperlinks have been added."); myDoc.close(); } } function doSearchAndReplace(stringfind, urlstring, searchin, myDoc, myHyperlinkStyle) { app.findTextPreferences.findWhat = stringfind; //Set the find options. app.findChangeTextOptions.caseSensitive = false; app.findChangeTextOptions.includeFootnotes = false; app.findChangeTextOptions.includeHiddenLayers = false; app.findChangeTextOptions.includeLockedLayersForFind = false; app.findChangeTextOptions.includeLockedStoriesForFind = false; app.findChangeTextOptions.includeMasterPages = false; app.findChangeTextOptions.wholeWord = false; var myFoundItems = searchin.findText(); for (i = 0; i < myFoundItems.length; i++) { var myHyperlinkDestination = myMakeURLHyperlinkDestination(urlstring, myDoc); myMakeHyperlink(myFoundItems[i], myHyperlinkDestination, myDoc); myFoundItems[i].applyCharacterStyle(myHyperlinkStyle, false); } } function myMakeHyperlink(myFoundItem, myHyperlinkDestination, myDoc){ try { var myHyperlinkTextSource = myDoc.hyperlinkTextSources.add(myFoundItem); var myHyperlink = myDoc.hyperlinks.add(myHyperlinkTextSource, myHyperlinkDestination); myHyperlink.visible = false; } catch(myError){ } } function myMakeURLHyperlinkDestination(myURL, myDoc){ //If the hyperlink destination already exists, use it; //if it doesn't, then create it. try{ var myHyperlinkDestination = myDoc.hyperlinkURLDestinations.item(myURL); myHyperlinkDestination.name; } catch(myError){ myHyperlinkDestination = myDoc.hyperlinkURLDestinations.add(myURL); } myHyperlinkDestination.name = myURL; //Set other hyperlink properties here, if necessary. return myHyperlinkDestination; }
-
using the value of a form field in another form field
I hope that I can describe my problem. Please bear with me
I have a worksheet with a lot of form fields. For most of the text boxes and a few drop-down list boxes.
I use a lot of custom calculation scripts to determine what information auto fills in most of the fields.
But I have problems with a last form named ORTHOPLANID field.
The value that it auto fills depends on two other fields. A field is called MEDOOP. The other field is SUPPDENPLANID. I tried to use an if/then/else statement for ORTHOPLANID but it does not work. I'm guessing it doesn't b/c, the value of the MEDOOP field is generated from an if / then statement so I don't know whether or not the script recognizes its value as a real value.
Is there another way to get around this? I don't know if I have clearly explained the problem, but I hope someone can help
Thank you
Brandy
I think I know what the problem... You did not drop-down fields
commit their selected values immediately (under Properties - Options). As one
result, the calculations take place when you exit the field (i.e. click)
outside), and not when you do a
selection.
-
How can I activate the values hidden Login form in session variables?
QUESTION: How can I get form elements hidden for primelang, studylang, country and nationality of the Login form Post table to become the session variables?
Adobe page at http://kb2.adobe.com/cps/165/tn_16563.html gave me the info that didn't work because the code is old. The first question I asked was answered in useful, but partial and no values are appearing. All this is set out below, and I don't know if I can shorten and still make sense.
Page 1 has a form of connection with six fields.
The textfields in form are the user name and password.
The hidden form fields are: nationality, country, studylang, primelang and their values will be set by incoming was a previous page URL or hard-coded in.
I am trying to create four hidden fields session variables to avoid having to deploy recordsets on each subsequent page.
After the "connect" button is pushed, I want that these four form fields hidden, nationality, country, studylang, and primelang and their values, proceed to the next page, as of Session Variables and then be available to all pages so I can use them in the links to other pages and in < img src="folderX/SessionVariableValue/book1.php. > Make sense?
Each page of support seems to work:
On the login page, the $MM_redirectLoginSuccess = "yadayada.php"; works very well.I used <? PHP if ($_POST) {print_r($_POST) ;}? > to check the post table and it works properly for all areas.
I created links to the four Session Variables with the same words: primelang, studylang, country, nationality, and them deployed on the recipient page:
<? PHP echo $_SESSION ['primelang'];? >
<? PHP echo $_SESSION ['country'];? >
<? PHP echo $_SESSION ['nationality'];? >
<? PHP echo $_SESSION ['studylang'];? >
QUESTION: How can I get the form to primelang items, studylang, country and nationality of the table to enter the head Post code on the recipient page? I have deployed it in the code of the head, but the gentleman who offered assistance previously not a not inform me how to get the hidden field values in the "what".
<? PHP session_start();
$_SESSION ['nationality'] = 'whatever ';
$_SESSION ['studylang'] = 'whatever ';
$_SESSION ['primelang'] = 'whatever ';
$_SESSION ['country'] = 'whatever ';$nationality = $HTTP_POST_VARS ['nationality'];
$studylang = $HTTP_POST_VARS ["studylang"];
$primelang = $HTTP_POST_VARS ["primelang"];
$country = $HTTP_POST_VARS ['country'];
? >What is the magic, missing link?
I tried to use form Variables to pick up the values, but PHP doesn't, or I messed up. I can't find a FULL explanation of how to create, move, retrieve and deploy the Session Variables anywhere on the web. Thank you for your help.
What is the magic, missing link?
You're going to start, but the magic missing link is the realization that "it doesn't matter" is a fictitious string that represents everything you want to assign to the session variable.
$HTTP_POST_VARS and $HTTP_GET_VARS are obsolete. You must replace them by $_POST and $_GET respectively.
-
Remove the table if the value not in APEX_APPLICATION. G_f01?
Hello again!
I have an apex_application.g_f01 that contains the values in the boxes, now I want apex to remove rows from the table that contains values that are not present in the G_f01 (what are disabled) on submit.
I can't understand the sql code to do this, could someone give an example?
This can be a simple thing, but I'm getting confused a lot with sql, maybe because I just php and java.
EgaSega wrote:
I have an apex_application.g_f01 that contains the values in the boxes, now I want apex to remove rows from the table that contains values that are not present in the G_f01 (what are disabled) on submit.
I can't understand the sql code to do this, could someone give an example?
This can be a simple thing, but I'm getting confused a lot with sql, maybe because I just php and java.
One possibility would be to create a collection of APEX containing key checked values and use that as the source of the lines to be kept in the SQL delete. Something like:
begin apex_collection.create_or_truncate_collection('CHECKED_VALUES'); for i in 1..apex_application.g_f01.count loop apex_collection.add_member( p_collection_name => 'CHECKED_VALUES' , p_c001 => apex_application.g_f01(i)); end loop; delete from t where not exists (select null from apex_collections c where collection_name = 'CHECKED_VALUES' and c.c001 = t.id); end;
-
Popup LOV selected the value not in session state
I have a pop LOV element on a page in my application. Once the item has been selected in the list presented, I would like to use as part of a select statement. Select statement failed. It turns out that the value I want the popup THAT LOV is not being saved in session state, so of course the select statement fails. I determine this by clicking on the session menu item in the developer bar - the item itself presents itself, but the value is empty.
What would cause a popup LOV value choice not finish by in session state, and how do I make sure he gets there?
Thank you!
If you need the value in a SQL report, you can just set "Elements of Page to submit" in your report to your LOV element definition. Otherwise, create a dynamic fire action when your LOV is changed with a set of pl/sql null process action; then set Page elements to send to your LOV element.
Alternatively you could do it manually with your own function/Manager javascript using the '$s' Apex API by creating a dynamic action that JavaScript is triggered then the loading of the page:
$("#PXX_YOUR_LOV").on('change',function(){ var getValue=$(this).val(); $s('PXX_YOUR_LOV', getValue); });
Changing the value in LOV only updates the HTML code, the element must be submitted to the server so that the value that will be put in session state. The gurus can explain more, but the above methods are what I use depending on the situation.
see you soon,
John
-
UPS delivery mistake – [10001] XML document in the is not well formed
Hello
When choosing from the inverter to the delivery option, this error below the checkbox "address is residential.
[10001] XML document is not well-formed
If anyone has encountered this before? I have an access key and credentials entries MyUPS correctly in the CMS.
Thanks for any input.
Jeff
Thanks for the comments. I'll submit a ticket in British Colombia.
-
Hi, I have a form that contains a single reference, name of the partner and three values. I am trying to add a new element that adds the three values based on the ID and displays the result.
It's the sql which I use and it works if I type in a value for the ID fix, but when I replace it with 'P5_ID' I get the error below when the form is used. I can save the changes to the page OK.
I would appreciate help with this.
Thank you
Steve
Select
("Data_PSDM_Fcst". "' Month1_Act ' + 'Data_PSDM_Fcst '. "' Month2_Act ' + 'Data_PSDM_Fcst '. (' "Month3_Act") as "QT4.
of 'Data_PSDM_Fcst' 'Data_PSDM_Fcst '.
WHERE ID = P5_ID
ORA-00904: "P5_ID": invalid identifier
SteveKerry-Oracle wrote:
Hi, I have a form that contains a single reference, name of the partner and three values. I am trying to add a new element that adds the three values based on the ID and displays the result.
It's the sql which I use and it works if I type in a value for the ID fix, but when I replace it with 'P5_ID' I get the error below when the form is used. I can save the changes to the page OK.
I would appreciate help with this.
Thank you
Steve
Select
("Data_PSDM_Fcst". "' Month1_Act ' + 'Data_PSDM_Fcst '. "' Month2_Act ' + 'Data_PSDM_Fcst '. (' "Month3_Act") as "QT4.
of 'Data_PSDM_Fcst' 'Data_PSDM_Fcst '.
WHERE ID = P5_ID
ORA-00904: "P5_ID": invalid identifier
To use a value of element in SQL or PL/SQL of APEX block, use a reference variable to bind that precede the name of the element of the colon ("": "):
select ("Data_PSDM_Fcst"."Month1_Act" + "Data_PSDM_Fcst"."Month2_Act" +"Data_PSDM_Fcst"."Month3_Act") as "QT4" from "Data_PSDM_Fcst" "Data_PSDM_Fcst" Where ID = :P5_ID
I also highly recommend that you stop what you are doing now, remove all database objects that were created with identifiers respecting case-sensitive and re-create them according to standard practical Oracle so that they are case-sensitive. By the database SQL language reference:
Note:
Oracle does not recommend the use of identifiers in quotes for the names of database objects. These city identifiers are accepted by SQL * Plus, but they may not be valid when using other tools that manage database objects.
Names of objects sensitive to case and between quotes identifiers will only cause confusion and error.
-
How to capture the value of text form field?
Version 4.1.0
Hello
I have two tables, a database table where the data is stored, and a correspondence table that has all the account information.
I have a simple form (not in a table) on the base table. It has 4 fields,
1. an account id,
2 there are country
3 there are region
4 account manager.
All this is stored in a lookup table
When the user has entered the account number and create hits, the account id should be picked up and looked up against the table and the data that result must be returned to the form. When the user then presses the button send, the data must be committed in the table on which the form is created.
To do this I tried to enter the account number, the user enters into the form, I tried to capture using
apex_application.g_f01 (1)
But does not work. Any help with the way in which we can enter this value, validate it against the table, and then bring in the lookup table details in the form and then when the user submits, she should get engaged in the base table?
Thank you
Sunryansun wrote:
In addition, another question. In this case for the empno data has been extracted from the same table where the insert will be made. What happens if I need to get data from another table. So let's say that the Empno and details are also stored in the table "EMP_MASTER". in this form, can reference another table and complete the empno and empname?Also, the recording doesn't seem to work in this case!
Thank you!
Published by: ryansun on October 16, 2012 02:21
If you want to fill in all items, then it is easier to send the page...
You mean, you want to have your page depends on more than one table? Then the source you would be static not database column... you must use collections, please install the packaged Collection sample application to learn more...
Kind regards
Fateh -
Hello
I have a global varibale in a form having a block of the base table. I created a trigger on the base table data after deletion/update, it will include all the updates/delete lines in the Table of Trail.
I want to insert this global variable (which is available in the form) in the Trail Table as well as all other values of the record with the database trigger. But this global variable is available in the form not available in the database trigger. How to pass this variable to database trigger...
Help, please...
Thank you and best regards.Hello
Package variables are specific session.
If user1 is
PAK_TEST.lv_user = 'user1'
In the other schema user2
PAK_TEST.lv_user will always be the null value.Locking won't, if you commit records using the trigger.
Kind regards
Franck -
Insert automatically the values in tabular forms
Hello.
I have a page with a regular shape and a tabular form. The tabular presentation is shows the result of a query on a table called CONTACT_DETAILS...
Select * from CONTACT_DETAILS
where CONTACT_DETAILS. USER_ID =: P5_ID
... and: P5_ID is a hidden field on the ordinary form.
In the settings in a table, the CONTACT_DETAILS column. User_id is hidden. When a user clicks on the button "Add a line", fills the new line of cells, and then click on 'Submit', how can I ensure that the current value of: P5_ID is written in the hidden cell USER_ID for this line?
Thank you
NickThe hidden column can have a default value of type question and there you can put the name of the element as follows:
P1_HIDDEN_ITEM
Denes Kubicek
------------------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------------------ -
Technique to get the value in a form parent
So, which is good a deceit of form? Work on 11.1.2.3 I have a form where the settings are made for a salary for a unit of Lev0 account. I would like to see the total adjustments by watching a parent of units. Does anyone know how to do this? Maybe the parents can be pulled by a composite shape?
Thank you!
FA
Maybe you can add a dynamic account that displays data for the Parent of the selected entity level. Something like @PARENTVAL (Entity, Salary_Account) might help.
-
Code of the property not defined! Help, please! Can't find what the problem is!
So I do this coding for a school project and I repeated retype the code 3 times and the same problems still appear!
Here is the code
function keyDownHandler(Event:KeyboardEvent):void
{
if(Event.keycode == 38)
{
SpeedVert-=. 2;
avatar_mc.gotoAndStop ("up")
}
another if (event.keyCode is 37)
{
SpeedHor-= 1;
avatar_mc.gotoAndStop ("left")
}
another if (event.keyCode is 39)
{
SpeedHor += 1;
avatar_mc.gotoAndStop ("Right")
}
The problem
1119: access of the keyCode property possibly undefined via a reference with a static type flash.events:MouseEvent
1119: access of the keyCode property possibly undefined via a reference with a static type flash.events:MouseEvent
1119: access of the keyCode property possibly undefined via a reference with a static type flash.events:MouseEvent
The problem is the keyCode! I can't understand August what is the problem!
Thanks to all who help!
In your function definition line, you use "Event" (false) while the code within the function uses 'event' (better). Difficulty for beginners. Also, given that the messages that all have "MouseEvent" identified in them, I have to wonder if the event listener that you assigned is not specified as a listener KeyboardEvent
Maybe you are looking for
-
T410 with availability of Windows XP Professional?
First of all it seems that you can not buy a downgraded XP directly from Lenovo machine more, as soon as the business portal (this is for commercial use). Can anyone confirm this? Our company has not bought directly before Lenovo. We have always boug
-
My HP OfficeJet L7680 is overprinting several documents at the same time.
I upgraded my Vista PC 32-bit to 64-bit Windows 8 Pro a few months ago, I downloaded and updated the L7680 software. All worked fine for several weeks, but recently, the OfficeJet L7680 print looks like to print several documents on the other (overpr
-
original title: BlueScreen BCCode: 116 BCP1: FFFFFA8005A094E0 BCP2: FFFFFA6002515F9C BCP3: 0000000000000000 BCP4: 0000000000000002 What can I do to fix this?
-
How can I unzip the .rar files and what is the best program to unpack these?
I want to play a game that requires decompression of these types of files, I can't seen to find the best way to go about it
-
How to avoid unnecessary data to insert one to another table?
Hi allI have data in the target table let say called xxc_target and insert data into the target table Temp table.In the target table column values like thatcreate table xxc_target(Description varchar2 (100););create table xxc_temp(Item1 varchar2 (10)