Comparison of 2 numbers in dynamic action does not work

Hello
I am trying to create a customer validation between the 2 items (type number). If item1 > item2 then alert (the value of item1 should not exceed item2).
So I created a dynamic action (lose focus) about item1 with pl/sql expression: p_item1 >: p_item2 as the condition.

the problem is that the dynamic action never fires. When you set the condition never, he shoots very well. When I put the condition of value in the expression 1 = expression2, he never fires
but when the value of expression1! = expression2, he shoots very well. It seems to me little matter what values I use they never match. is this a problem of format because I have no relative model
the two elements.

any idea on what is happening?

Thank you

Published by: ICeT on August 16, 2011 13:18

Hello

You may notice that the item values are always STRING. So comparing: P1_ITEM1 >: P2_ITEM2 is a string comparison.

If you want to compare only the numbers that you need to explicitly type conversion: TO_NUMBER(:P1_ITEM1) > TO_NUMBER(:P2_ITEM2)

brgds,
Peter

-----
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
BuilderPlugin: http://builderplugin.oracleapex.info
Work: http://www.click-click.at

Tags: Database

Similar Questions

  • Show / hide the dynamic Actions does not work in Windows 7 IE10 and APEX 4.2.1

    Hello

    I have a page in the APEX 4.2.1 reactive Blue theme, where show or hide page elements based on changes to other page elements and their values, in terms of JavaScript expression.

    It's that everything works well in Chrome 31.0.1650.63 m and 25.0.1, Firefox but not Internet Explorer 10. I thought it might be linked to this solution to the problem of Ajax IE10 | Code of Jason and tried their recommendation, but appears not to have contributed.

    Help please!

    Thank you

    Alex.

    I found the problem and it was my fault. One of my dynamic actions using JavaScript expression conditions was missing quotes in $v ("P1_ITEM1"), breaking the rest of the related JavaScript code. Chrome and Firefox did not care, but IE seems to be less tolerant of mistakes like that.

    Scott, thanks anyway. It is useful to know that I have that option as well.

  • Dynamic action does not work with the item change event

    Hi guys,.

    I have a problem with the dynamic Action. On my page, I have three points. (P2_X-> display only, P2_Y-> P2_Z-> button, TextField) and two dynamic actions. One of them is running javascript. When I press the button (P2_Z) this dynamic action affects textfield (P2_Y) value to display only the value (P2_X). (This dynamic works). And there is another dynamic action for the option to display P2_X. This dynamic action fires to P2_X point value changes. This DA (dynamic action) runs a plsql code and inserts the value of the P2_X element in a table (test_tbl). But when I try to do it always inserts the null value.

    The plsql code is below:

    Start
    INSERT INTO TEST_TBL
    VALUES (: P2_X);
    COMMIT;
    end;


    You have an idea? If you need, I can give the user for apex.oracle.com past.

    Thank you

    Hello

    Do you have the "points Page to submit" to the process of PL/SQL, the value of the correct item? (P2_X)

    Concerning
    J :D

  • Confirm the dynamic action does not not as expected in the APEX 4.2.5

    This looks like a bug in APEX 4.2.5.  I have a page with a "Cancel" button that redirects to another page.  There is a dynamic action that fires on the button with a confirmation action and the text ' are you sure?  However, if the user selects OK or cancel in the confirmation dialog box makes no difference - the redirect is always performed.

    I found this question after the migration of a page that worked to 4.1.1-to-4.2.5.00.88 APEX and were also able to replicate on apex.oracle.com here:

    https://Apex.Oracle.com/pls/Apex/f?p=19896:2

    (Press the Cancel button in the top right of the page redirects to page 1, regardless of the user's response to confirm the popup.)

    I don't need someone to suggest the alternative code, I know how to build my own confirmation processing.  I want to just raise this as a bug as possible and see if there is a solution to make the dynamic action works as it should.

    NB I found this in the patch notes for 4.2.5.00.88 on a fix for a similar problem:

    http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/Apex-425-patch-set-notes-2186274.html

    15984978

    Dynamic action front-Submit with a confirmation message does not

    Hi Tony,.

    I think the problem is that the action of the button is defined as 'Redirect page in this Application', but it must always be "defined by the dynamic Action" as soon as you have set dynamic actions 'click' to a button. Normally, which is automatically changed as soon as you create your first dynamic action of a button, and I just confirmed by creating a test button in your application that has been defined as «Redirect...» ». After that I created a dynamic action the action of the button is set to "defined by the dynamic Action.

    Is it possible that you have modified the action of the back button to «Reorient...» » ? The question why «redirect...» "does not work, it's that we cannot guarantee in what order the browser will process click on events defined with onclick in the tag button itself and those events attached as a click event handlers. This is why it is necessary that everything is defined as dynamic actions. Only in this case you will be able to cancel the treatment.

    Concerning

    Patrick

    Member of the APEX development team

    My Blog: http://www.inside-oracle-apex.com

    APEX Plug-Ins: http://apex.oracle.com/plugins

    Twitter: http://www.twitter.com/patrickwolf

    Post edited by: Patrick Wolf

  • Dynamic action does not not with the Date

    Hi all

    In my form, I created a dynamic action to be pulled on losefocus on the date of the birth column. The action returns the age in the age column. It only works if I use the date of birth hard-coded as follows:

    SELECT
    SYSDATE - AGE TO_DATE('01-JAN-2007','DD-MON-YYYY')
    OF THE DOUBLE

    It does not work if I use the actual date of entry as follows:

    SELECT
    SYSDATE - AGE TO_DATE(:P2_DOB,'DD-MON-YYYY')
    OF THE DOUBLE

    My version of the apex is 4.02 and database 11g.

    Could someone point out what I'm missing.

    Thank you
    Zahid

    Hi Zahid,

    When you want to use the values of the element of the page in a dynamic action of pl/sql, you must go to the section "Articles to submit the Page.

    brgds,
    Peter

    -----
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • "set the restart target action" does not work, why?

    There is an element of "set the restart target action" in the SDF file. I put it to "run a system definition.

    But it does not work. I don't know why. It seems that when the project is canceled, the SystemDefinitionData.nivscfg file is deleted.

    Cancel the deployment of will stop the configuration and mark idle.

    If you restart the RT target by HW button or through the channel "System of command channels", while the configuration is active, it will start the Setup again after the reboot.

    Jiri K.

  • Tip action DOES not work in the Flash output

    Hello

    I created a module in line with Captivate 9 using an advanced conditional action to display the button at the end of 2 sections.

    The trigger works well in the release of HTML5, but it does not work in the Flash output: users need to go back to the slide with the action advanced a second time in order to show the next button.

    It is the created tip action:

    advanced_action.png

    Help, please. Thank you

    Lisa

    Change the order in the updated standard measure jump to slide as last order, or at least after the command of the increment.  The actions are executed in sequence, if you jump first to this slide, where the on enter event is executed, the variable has not yet been incremented. Try to see if it solves the problem. HTML is different from SWF to react (it is converted to JS so that SWF to ACE).

    You post the screenshot of the timeline.

    Moreover, as I have indicated already, I would add continue to the part of the TIME as well as the ELSE part. I learned that, in certain circumstances, a conditional action with that one decision, and no ELSE part does not work well. It is not a problem if you have several decisions.

  • Tip action does not work when I add a second block of decision

    I'm writing an advanced action 8 Captivate. In response to a question about the points, the user types a number in a text entry area. When they support, the fast action will assess the number. If it is 10, the program should jump to a slide that shows that 10 is the right answer. (When I do just that in a single block of decision, it works.)

    However, the full tip action must assess if the value is higher or lower than 10, then return the user to the question slide and displays an appropriate message. When I add the part in a second decision block, advanced action performs as expected if an incorrect value is entered, but does not work if the correct value is entered. It does is display the question slide once again.

    Here is the code:

    Captivate advanced actions code_01.jpg

    Any ideas on what I am doing wrong? Should there be an ELSE statement in the first block of decision? I tried to continue, but that did not help.

    -Stuart

    The logic of your advanced action is not correct. All decisions are always evaluated. What is happening here is the following:

    1. First decision check if var is equal to 10; If this is the case, it will change to slide 2
    2. Second decision check if var is greater than 10, if it is accurate, it will move on to slide 1. I guess the capPoints1High is ON slide 1?
    3. BUT here's the logic bug: If If is not greater than 10, which is also the case when it is equal to 10, it will change to slide 1, although already, he jumped to slide 2 first with the first decisioin

    Two possible solutions:

    1. decision of the switch 1 and 2 (one easier)
    2. remove the ELSE part of decision 2 and create a decision 3 to check if var is less than 10
  • I am trying to reinstall Flash CS4 professional as the script action does not work, but now I get an error: 2 message when I use the original CD to reinstall

    I can't get the original disc work on resettlement.  I get the message

    AdobeColorCommonSetRGB

    Error:

    Error 2.

    I'm teaching a class using this program on Macintoshes running 10.9.5 and action script does not work.  It will work on any program designed by using the 10.8, but if you create an animation on 10.9.5 the action script will not work for buttons

    You must manually remove the color in question profiles... Run the cleanup tool and see if it's to help you get started.

    http://www.Adobe.com/support/contact/cscleanertool.html

    Mylenium

  • Game audio action does not work in Captivate 7

    Hello

    On the first slide in my class, I added a "quick start" guide It consists of a series of legends that contains text. In each legend, there is a text link "Continue" triggering a tip action to hide the current legend / show the following. This works perfectly.

    Now, I tried to reach audio at each step of the guide. I added a "audio playback" action after stocks show/hide for the first step. No audio not playing. When I changed the audio of the game to be the first action in the script - the script did not work at all. When I changed it between the show and the skin, leather working and show does not. What I gather from this is that play the audio does not work and also stops all this.

    Any advice?

    Thank you

    Just checked, created an action shared with almost exactly the same commands, but grouped together all the containers in text in a group Gr_TC

    Hide:

    It worked perfectly. You don't see a label, because it is a common action, to which I just filled in some settings. Attached to three buttons, had 3 containers of text and 3 different audio clips.

    The audio clip plays when it is used in another way? The only difference seems to be that you have a clip of VO and I used one of the sounds included with Captivate.

    Another way would be to fix the audio on the text as audio of the object container. Once you view the text, audio will play, when you hide the text to stop. It was the way to go before COP6:

    http://blog.lilybiri.com/playtime-with-audio-and-widgets

    Lilybiri

  • Dynamic text does not work

    function pickUp(event:MouseEvent):void {}

    event.target.startDrag (true);

    replytxt. Text = "";

    event.target.parent.addChild (event.target);

    startX = event.target.x;

    startY = event.target.y;

    }

    function dropIt(event:MouseEvent):void {}

    event.target.stopDrag ();

    var myTargetName:String = "target" + event.target.name;

    var myTarget:DisplayObject = getChildByName (myTargetName);

    If (event.target.dropTarget! = null & & event.target.dropTarget.parent == myTarget) {}

    replytxt. Text = "Good Job!"

    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropIt);

    event.target.buttonMode = false;

    Event.Target.x = myTarget.x;

    Event.Target.y = myTarget.y;

    counter ++;

    } else {}

    replytxt. Text = "Try Again!";

    Event.Target.x = startX;

    Event.Target.y = startY;

    }

    if(Counter == 6) {}

    replytxt. Text = "congratulations, you're done!"

    }

    }

    For some reason, does not work my dynamic text. There is only a single key for text image... nobody knows what's the problem?

    you need to incorporate your policy.  and, you must add any text in a dynamic textfield in the cs5 design environment.

  • Built dynamically URL does not work

    Hi all.

    I have the following code in a PL/SQL block in the APEX like this which is actually almost identical to the example of Application APEX on the apex.oracle.com site.  However, I got a manual code.

    Here is the code:
    < code >

    sys. HTP.p ("< div class =" products"> ');

    sys. HTP.p ("< table width =" 100% "cellspacing =" 0 "cellpadding ="0"border ="0">)

    < thead >

    < tr > < class th = "left" > product < /th > < th > price < /th > < th > < /th > < /tr >

    < / thead >

    (< tbody > ');

    -ok here.

    C1 (select product_id, product_name, list_price, add_to_order 'Add to Cart'

    of demo_product_info

    where product_avail = 'Y '.

    loop of order by product_name)

    sys. HTP.p ("< tr > < class td =" left">)

    < a href = "javascript:popUp2('''||)". apex_util.prepare_url ('f? p = & APP_ID.:20 :'||: APP_SESSION |':ADD:P20_PRODUCT_ID :'|| sys.) HTF.escape_sc (C1.product_id)) | " (', "700", "400"); ' > '. sys. HTF.escape_sc (C1.product_name) | "< /a > < table > < td > ' | Trim (to_char (C1.list_price, '999G999G990D00')) | "< table > < td > < a href =" '. apex_util.prepare_url ('f? p = & APP_ID.:12 :'||: app_session |':ADD:P12_PRODUCT_ID :'||) C1.product_id) | " ' Class = "uButton uAltButton plu iconButton" > < span > < class i "iR" = > Add < / i > < / span > < /a >

    (< table > < /tr > ');

    end loop;

    sys. HTP.p ("< /tbody > < / table > '");

    sys. HTP.p ("< div '");

    < code >

    The problem is that the link that displays on the screen does not work even if the pointer to the arrow at the end of the finger.  The system just stays there and I can't for the life of me, see the problem.  The blocker is disabled.  The rest of the code works as the CSS.

    Any tips?

    I think it's wrong in the params of 700 and 400. They are between double quotes (at least in the code you posted!), while they are wrapped in the href quotes. Also do a double single quotation mark as you did around the part of the url.

    ''
    
  • Dynamic action does not not on the first attempt to load page. Work after refreshing the page

    4.2.1

    Hello

    I have a page with a list of selection Order_id and a display _item Product_name.  There is action dynamic PL/SQL that fills the element displayed when the order_id is changed. The problem is that when I opened the page for the first time, if I change the select order_id list, nothing happens. But if I refresh the page once, and then it starts work and the display_item is filled.

    No idea what could be the problem?

    Thank you

    Ryan

    ryansun wrote:

    On a more serious note,.

    1 when you load the page for the first time and try selecting the order_id, nothing don't be past, try refreshing the page once and you will see the option to display with the null value. What I do is. I have two tables

    Orders

    1

    2

    3

    Products

    1A

    2B

    2 Z

    3 C

    When I select the command 1, then since there is only one line of products, the displayed item will indicate A populous. If I select 2, since there are two product lines, I should see the list box.

    Doesn't seem to work and I'm sure, I'm doing something wrong.

    Difficult to be certain that as it appears that someone has been editing the page before you start watching (rather than copy the page experience their own copy). Your article P1_PRODUCT_NAME_DISPLAY he a point value / Expression 1 column = Expression 2 condition P1_HIDE_SHOW = 1 condition on that? Or any other condition of rendering?

    These conditions do not match the dynamic actions. They are applied only during the page see the transformation when the page is displayed first; When it is linked to another page; or after a branch to him. They are not applied dynamically during the activity of the user on the page. In this case, that the status is set to false when the page is rendered first, the same element does not exist in the page sent to the browser. If you want these items to appear conditionally because of the interaction with another user control, then you must initially return the elements and control their visibility using hide/show the dynamic actions.

  • Hide advanced action does not work after that triggered the effect

    I have a pretty simple step action that does the following:

    Hide banner

    Apply motion effect to 3 SmartShape from right to left

    Cache: SmartShape3


    SmartShape 3 is essentially half a rectangle rounded, which acts as a banner with text. At the beginning of the slide, it is hidden and sitting almost out of the scene. When you click a button, it does the following:

    See the banner

    Show: SmartShape3

    Applies the effect of movement from left to right to SmartShape

    This gives the illusion that it slides in from the left. The reason why I had it sat a little on the scene at the beginning, is that the effect is slow, so this makes it speed up as it has less distance to travel.

    The idea is the action above in blue is triggered and the banner slide from the left on the stage. Another button is pressed and the Red action is triggered sliding off the stage. But once the motion effect has been run, it does not seem to hide, leave the end of the rounded rectangle visible on the stage.

    I tried to adjust the break lines in the buttons that trigger these actions further pushing them to the bottom of the timeline, but it has no effect. I actually expected to start the path and then hide the shape so fast, that you wouldn't see in fact a large part of the effect as when stocks advanced spear they are super fast.

    Am I missing something or is this just a limitation with effects using advanced Actions?

    You have a misunderstanding about the actions. All orders in a fast action are executed in sequence, but immediately. The effects also have a duration, you don't say how long you have applied.  Can you post a screenshot of the timeline? Have you checked the length of the path, is it enough? You do this using the same temporal effects. BTW, I often apply such an effect using micronavigation instead of applying it. In my last blog, you can see an example:

    More in a... hyperlink - drop-down Menu - Captivate blog

  • Stop(); Action does not work in AS3?

    I am a designer and usually work in AS2.

    But I created a movie in as3 (to use the function of the BONE), and now my actions to stop do not work.

    What I usually do for my movies, it's breaking down the film in some parts of the main timeline (content, start, end), place stops on each of these frameworks.

    And in the clips that play on these labels, I put a call:

    Stop();

    _root.gotoAndPlay ('content') etc...

    in any case none fixed this in AS3?

    I use CS4 if it matters.

    The stop() command works as well in AS3 as it does in AS1/2.  What does work is to use AS2 terms such as "_root".  In general, if a stop() command does not is because another code's fault or otherwise of the substitution of the stop().

Maybe you are looking for

  • Cannot access the page «get modules»

    I had just refreshed my computer and I am trying to reinstall my Add-ons, but I can't access the page of the modules 'get '. I tried all the troubleshooting methods suggested. and still no:The secure connection failed An error occurred during a conne

  • Satellite P100-188: where to get a nVidia sticker?

    Hey everybody. I bought my Satellite P100-188 last Sunday and I must say he realizes a lot in terms of games and General all-around use. In any case, inside when you open the lid... I can see on the left, the badge sticker 'Core Duo', higher than is

  • CVI 2013 and Windows SDK

    Hello I just downloaded and installed the complete system of development Labwindows/CVI 2013 on my new computer. It's a Win7 64-bit computer. What I have to do all the facilities additional to use features of Windows SDK, or is it included in the def

  • 614332 001, pavilion DV6T-3000: front drive 614332-001

    The CD/DVD-writer / optical drive Blu - Ray Player in my laptop Pavilion DV6T-3000 died. The reader sends is more a signal to the computer when a disc is inserted. So if I try to access the drive, I get the prompt telling me to insert a disc and inse

  • I can't install Dell V715w pinter on my HP computer

    one