Assignment of a value to a numeric field with a button

11gxe, apex 4.x,

Hi all

I'm trying to assign the value to a number field with a button,

I created a button, then one action for this button, when it is selected.

dynamic action is based on Pl\Sql code and the code is

begin
:p2_assign := 455 ; -- where the page is "p2" and the number field is "assign"
end ; 

but it does not work, why?

Create a DA

Select the onclick of the button

Set the value as action

Select the item that should be defined as

You return your return values

Tags: Database

Similar Questions

  • How can I add Auto text based on the value in the numeric field?

    Need help... I'm trying to add the auto text to a text based on a value in a numeric field. I want my text fields (summary box) to say 'Success' if (box score) value is equal to 10 and say "is not good" If the value is less than 10. My digital field is calculated by selecting drop-down lists.

    Thanks in advance for your help.

    Ed Watson

    Here is a link to the document that I created...

    https://files.Acrobat.com/?TrackingID=KGLIT#folder/c3106c32-2e69-4a5f-8ef2-94d25623dbfb

    Try this:

    If (NumericField1.rawValue< 10)="">

    TextField1.rawValue = "does not."

    }

    else {}

    TextField1.rawValue = "passed."

    }

  • How to set a value in a numeric field based on a checkbox field?

    I try to get a numeric field to return to a certain numerical value according to the response from the user for a checkbox control. Here is my code:

    If (CheckBox1 .rawValue [0] == 1) then $.rawValue == 969.00 else $.rawValue == "" endif

    When the form is displayed, the value of the numeric field poster in the form $1,00 and if I check the box it changes $ 0.00 - but I want him back $969,00 if checked and be empty when not checked.

    Can someone help me understand this?

    Hello

    FormCalc syntax, so make sure that you have set the language in the script in FormCalc Editor.

    Also, you are right when you test equal to use the double equal sign ==. However, when you set a value, you use a single equal sign.

    FormCalc does not need the .rawValue.

    Make sure you have set the 'specify values' tab of object/link check box and on = 1. [0] in your script also indicates that there is more than one occurrence of CheckBox1. I'd be inclined to objects of unique name, as it makes it easier to script.

    So it should work in the case of calculating the numeric field:

    if (CheckBox1 == 1) then
         $ = 969.00
    else
         $ = 0.00
    endif
    

    Configures the model of the numeric field for monetary symbols, etc.

    Good luck

    Niall

    PS you can put figs in quotes. Also having the calculate event script will automatically make the calculated - read only field. You can, but if you do not you can change it in the tab/value of the object. On the other hand, you can have a script similar to the output of the box event.

  • Change the value of the numeric field

    Hello

    I created a form with three numeric fields for a list of prices.

    They have a predefined value.

    Price.01 = 600

    Price.02 = 500

    Price.03 = 1200

    I want to create buttons to change the values for numeric fields.

    for example

    var price = this.getField("price.01").value;

    price = 750;

    This code should change the value of the field price.01 to 750, but nothing happens.

    The second task is very simple. Calculate the sum of the three numeric fields.

    I created a fourth field and calculate to the tab, I chose in the AutoSum.

    Yet once, nothing happens.

    Am I missing?

    A screen refresh function should be added?

    any help would be appreciated

    (using acrobat 9 pro)

    Regarding the first question: you need to access the property value directly, as follows:

    this.getField("price.01").value = 750;

    With regard to the second question: is there any error messages in the console (Ctrl + J) JS? All fields are set up in the form of fields numbers?

  • How to display all - what is the generic value for a numeric field?

    I have a products table and a table of product assimilated into my database category.

    In the products table, each product has a numerical value in its product category field (int), which relates to the rowID (int) for the category in the product category table.

    I created a search form that allows you to select a category in the categories list in the categories table product and my set of records in the page of results is set to filter by category ID but I want users to categories "show all" but when I pass an empty value or a value of '%' in the nothing recordset is returned or if an error occurs.

    Here is a basic example of my form:

    < name of the form = "searchform" action = "resultspage.asp" method = "post" > "

    < select name = "categoryID" id = "categoryID" >

    < option value = "" > view all the < / option >

    < option value = "1" > lights < / option >

    < option value = "2" > paint < / option >

    < / select >

    < / make >

    .. .and a basic example of my recordset on my results page:

    < %

    Dim rsPROP__MMColParam

    rsPROP__MMColParam = '1 '.

    If (Request.Form ("categoryID") <>"") then

    rsPROP__MMColParam = Request.Form ("categoryID")

    End If

    % >

    < %

    Dim rsPROP

    Dim rsPROP_cmd

    Dim rsPROP_numRows

    Set rsPROP_cmd = Server.CreateObject ("ADODB.Command")

    rsPROP_cmd. ActiveConnection = MM_cs_STRING

    rsPROP_cmd.CommandText = "SELECT prodid, product, categoryID FROM dbo.products WHERE categoryID =?"

    rsPROP_cmd. Prepared = true

    rsPROP_cmd. Parameters.Append rsPROP_cmd. CreateParameter ("param1", 5, 1, -1, rsPROP__MMColParam) ' adDouble

    Set rsPROP = rsPROP_cmd. Run

    rsPROP_numRows = 0

    % >

    I know it's probably something stupid, but I'd appreciate any help I can get as I keep going round in circles with this one!

    Thank you in advance.

    Concerning
    NJ

    Thanks booth.

    Strangest thing... I just tried a Google search for a solution to this problem and came across another thread on this forum.  At the moment I am inside of him, I realized one of those involved came from me years!  Bab, already known it or what!

    Changed my recordset for...

    <>

    Dim rsPROP__MMColParam

    rsPROP__MMColParam = '0 '.

    If (Request.Form ("categoryID") <> "") then

    rsPROP__MMColParam = Request.Form ("categoryID")

    End If

    %>

    <>

    Dim rsPROP__MMColParam1

    rsPROP__MMColParam1 = '1 '.

    If (Request.Form ("categoryID") <> "") then

    rsPROP__MMColParam1 = Request.Form ("categoryID")

    End If

    %>

    <>

    RsPROP Sun

    rsPROP_cmd Sun

    rsPROP_numRows Sun

    Set rsPROP_cmd = Server.CreateObject ("ADODB.Command")

    rsPROP_cmd. ActiveConnection = MM_cs_STRING

    rsPROP_cmd.CommandText = "SELECT prodid, product, categoryID FROM dbo.products WHERE ISNULL(?,0)" = 0 OR categoryID =? ".

    rsPROP_cmd. Prepared = true

    rsPROP_cmd. Parameters.Append rsPROP_cmd. CreateParameter ("param1", 5, 1, -1, rsPROP__MMColParam) ' adDouble

    rsPROP_cmd. Parameters.Append rsPROP_cmd. CreateParameter ("param2", 5, 1, -1, rsPROP__MMColParam) ' adDouble

    Set rsPROP = rsPROP_cmd. Run

    rsPROP_numRows = 0

    %>

    .. .and it works very well.

    Appreciate the help. I followed your advice and did an If Else on the WHERE clause to achieve the same.

    Thank you.
    NJ

  • using formcalc I would like to pass a numeric value to a numeric field when an option button = YES

    My pictures have been blocked to content?

    CLCK here for example http://webgis.co.okaloosa.fl.us/website/okaloosagis/gm/yes.bmp Yes

    CLCK here for no http://webgis.co.okaloosa.fl.us/website/okaloosagis/gm/no.bmp example

    I have tried both below and get errors on the =

    If (xfa.resolveNode ("qfax. #field") ="YES") then this.rawValue = 10

    If (xfa.resolveNode ("qfax. (#field') = 'YES') then this.rawValue = 10

    If (xfa.resolveNode ("qfax. #field") .rawValue ="YES") then this.rawValue = 10

    If (xfa.resolveNode ("qfax. (#field") .rawValue = 'YES') then this.rawValue = 10

    Thank you

    Mike

    has managed to figure out using JAVA

    If (xfa.resolveNode("qfax.#field").rawValue is "YES")

    {

    this.rawValue = 10

    }

    on the other

    {

    this.rawValue = 0

    }

  • How to restrict a value in a numeric field.

    I'm looking to see how I would limit the number in a number field, I want that the user has the ability to put in any number between 1 and 80.  I am a newbie in this please descriptive in your answer.

    Sorry, but this isn't the correct list for your question. There are many different forums for different products LiveCycle (http://forums.adobe.com/community/livecycle). You should take the one about the product you are using. Your question I assume that you are talking about LC forms?

  • engaging multiple values to a text field for a button

    I have a form that has several buttons that uses the items.push (command/script/EC) that you have to put some text in a text field.  People are asking now that they can put several selections from the button in the field.  Can someone point me in the right direction, or suggest a way to do it?

    I have attached a screenshot.  I clicked the button on the left to view features of the buttons and right I already have something of the key and he was placed in the text field.  I would like to be able to place several things in the field of the key even if possible.Screen shot 2011-01-19 at 12.14.18 PM.png

    You could change the code to:

    If {(response)

    Get a reference to the text field

    var f = getField ("competency");

    Add the selected value field, separated by a carriage return (except if the field is empty)

    f.Value = f.value? f.Value + "\r" + elements [answer]: [answer] points;

    } else {}

    App.Alert ("You have not selected an element.", 1);

    }

  • Exempt a field with a button?

    So I have a form I'm trying, one of the parties is a subtotal, tax, the total field. My total field is calculated using the sum of the subtotal and tax. My field of tax is calculated using custom;

    var f = this.getField ("subtotal");

    Event.Value = Math.round(f.value * 7.00) / 100;

    I want a button but that would disable the tax area. That way if I need to apply a tax exempt I can press a button and the scope of the tax is no longer automatically calculated and applied.

    Any help?

    It might be better to use a checkbox. The script could check if she is selected and calculate accordingly. Something like:

    (function () {}

    Get the subtotal value, as a number

    var v1 = + getField("subtotal").value;

    Get the value of the "taxable" checkbox If not selected, the tax = 0

    var v2 = getField("taxable").value;

    Calculate the tax

    V2 = Event.Value = "Off"? 0: Math.round(v1 * 7.00) / 100;

    })();

  • Adding a set of fields with a button

    Hi Paul,.

    I was looking to add a group of items (some fields) dynamically by the user when you click Add and came across one of your previous posts that had exactly what I was looking for. Can you help me unserdstand how to? I enclose a copy of reference of what I'm asking and a sample of my friends (in mine, I want to add to all the information in #1 and recusrsively integration added to the user's needs). Your help would be appreciated, thanks!

    Vijay

    Hello

    To add all the fields, it is better to wrap it in the subform as I did as an attachment. Your form must be fluid and dynamic.

    Main script, which adds is

    subform.instanceManager.addInstance ();

    Modified form.

    BR,

    Paul Butenko

  • Join numeric fields

    I have 3 different numeric fields that represent the branch, account number and the numbers of the audit of a bank account

    I also have a text field which, under a validate event, joined the values of 3 numeric fields (separated by a '-' and a ' / ') by using the following code

    If (BRANCH.rawValue! = null & & ACCNUM.rawValue! = null & & VD.rawValue! = null) {}

    JOINED_FIELD. RawValue = BRANCH.rawValue + "-" + ACCNUM.rawValue + "/" + VD.rawValue;

    }

    If I filled in the fields of digital type with for example

    DIRECTION = 11

    ACCNUM = 222

    VD = 3

    the joined field shows 11 - 222/3

    But if I finish the BRANCH field with 0, I get a JOINED field validation error

    Can someone help me how to avoid the warning message when the selected branch is 0?

    Thanks in advance

    Move your code to the event Calculate of the "JOINED_FIELD" field instead of the Validate event.

    You calculate the value of a text field based on the values of numeric fields 3 actually.

    Thank you

    Srini

  • Using OnChange or OnBlur for changes the value of a hidden field

    I have a need to update the value of a hidden field with the value from a menu of the list. I studied the OnBlur and OnChange JavaScript functions but can't find anything suitable. Here's the deal:

    If a user selects California on a list of State menu, I need to immediately update the value of a field hidden with the "California". (Both fields are on the same page) All this must occur BEFORE the user submits the page. Each time they choose the State from the menu to list the value of the hidden field must change.

    Can anyone offer any suggestions?

    Thank you!

    Well Yes, that did the trick for the hidden field. Thank you very much.

    I'll be able to also store this value in a session variable? (see previous post)

  • Check box if the numeric field is equal to the value

    Newbie needs help!

    I am writing a script to check a box, but only after a numeric field adds up to "4".

    If you look at my attachment, "Student 1" has four check boxes (skills before the course, courses, etc.).  Each time that these boxes are checked/unchecked, the numeric field + or - 1 for the rawValue.  The script that I have problems with is on the box next to student 1...

    Here's the script of 'calculate' attached to this box:

    If (stu1_results.rawValue == 4) {}

    CheckBox_stu1.rawValue = true; Select the check box

    else {}

    CheckBox_stu1.rawValue is false; Clear the check box

    }

    Any advice would be great!

    Mike Schaefer

    (blinkyguy)

    There were two things wrong with your code. Logically, it was fine, but you have been mixing an entitled, declaration of the NTS and a comparison. In an if statement if you wantt o compare two values that you need two equal signs. If you want to assign a value to another, you need a single equal sign. Who was number one. The second is when you assign the value of the checkbox. The power values are 1/0 not true/false. So, you can either modify your code to assign a value of 1/0 instead of true/false or modfiy the box to the true/false as values instead of 1/0.

    The code should look like this:

    If (stu1_results.rawValue == 4) {}

    CheckBox_stu1.rawValue = 1;

    } else {}

    CheckBox_stu1.rawValue = 0;

    }

    Paul

  • By assigning a value to a text field not working PHP/javascript?

    I have a site to someone else coded, where a text field does a value that is assigned.

    Both
    Form1.textfield3.value = form1.textfield1.value;
    and
    Form1.textfield3.value = "99";

    not work, and the field is left blank.

    This same code works on Internet Explore (Win and OSX), Safari, Chrome and Opera. It does NOT work on Firefox 8 or 9.01 (Win and OSX) or 3.6.25. He used to work on an older Firefox, we had (unknown version).

    JavaScript is enabled; is there anything else we can check?

    If you check the error in Firefox (Ctrl + Shift + j) Console, you will see "form1 is not defined. This is because Firefox converts automatically form1 in reference to < form = "form1" name >. Instead, you must change the code a bit.

    You can fix the above error starting each function where you refer to form1 with this:

    Form1 = return ["form1"] var;

    However, probably just move the error to the next part of the notation (for example, textfield3). The proper way to refer to the value of a form field named is:

    document. Forms ["Form1"]. Items ["textfield3"]. Value

    or if you have set form1,

    Form1.elements ['textfield3'] .value

    If you have a few changes to make. Not sure if there are shortcuts.

    This forum focuses on the care of the end user. You can find more help web development on the mozillaZine Web Development Council. Separate forum, separate registration.

  • Data clean on a numeric value in the text field

    Hello team,

    There is a field called 'turnover' in our Eloqua instance. It is a text field, but contains mostly numeric values synchronized in the same field of SFDC. The SFDC field is numeric.

    I am trying to write a program of standardization of data that uses the "Annual sales" value to update another field, "standardized annual income", with the value appropriate for example Strip $0 to $5 M, $5 - $10 M, $10 / $20 M...

    I created a rule to update that search values:

    • between 1 and 5000000 "turnover" and updates the "standardized annual income" field of $0 à $5 M
    • between 5000001 and 100000 in the "Annual income" and updates the "standardized annual income" field $5-$10 M
    • and so on...

    However when I test it I get the correct value in 'annual standardized income. " I also tried using filters to make contacts with the "annual income" values between 0 and 5000000 but I get all kinds of values outside this range.

    Can someone tell me where I'm wrong? Is it because the data type of the field 'Turnover' is the text rather than digital? I guess I could create a new numeric field for "Annual income", write values existing in this area and change the SFDC integration but I would avoid it if possible. If anyone has any bright ideas, I'd love to hear them.

    Thank you

    James

    For anyone interested, I got the answer from the Support. As it is established as a text field that eloqua is trying to make an alphabetical "between" rather than a digital "between". As it is not possible to change the data type of a field, I need to create a new digital field, export the data to the existing field (as well as email address) and upload again to the new field.

Maybe you are looking for

  • No appropriate plugins have been found, how do I know which plugin to use?

    The url of the Web page is http://wheelchairs.com/pwrseat.htm, anyone know what I should plugins or can someone please point me in the right direction?Thank you.

  • the upgrade for laptop computer with printer

    I have a laptop HP Pavilion 8 new wireless Windows. I have a wireless HP Officejet 4620 also not very old. When I try to put in place, I had the operating system of the computer not supported message. Upgrad the operating system on this computer. Wha

  • I get a message that I have 25 pilots who need updates.

    Original title: Why will not be up-to-date windows free drivers as they do for free windows dates I get a message that I have 25 pilots who need updates.  I can't afford to pay for driver software to have the update done. How is the windows updates a

  • The Windows Firewall will not stay

    I found that my windows firewall turns off on its own.   It's almost as common as each log on and opportunities more often than that, when you are connected is required to check it often. Is this normal?

  • Can I uninstall Windows 10 if I don't like it?

    I have Windows 7 Home Premium that came pre-installed on my laptop. If I decide I don't like Windows 10, I'll be able to go back to Windows 7?