If else problum

Hi All
I have a form with two database field and one check box
i want when i check the checkbox then the color become green if unchecked red
where i wrote the trigger so execute the query and get the result
SQL> desc alarm
Name                                      Null?    Type
QUESTION_UK                                        VARCHAR2(500)
REPLY_UK                                           VARCHAR2(500)
IF :ALARM.REPLY = 'NO' THEN
     SET_ITEM_INSTANCE_PROPERTY ('ALARM.QUESTION_UK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'ATT_RED');
     SET_ITEM_INSTANCE_PROPERTY ('ALARM.REPLY_UK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'ATT_RED');
ELSIF
     :ALARM.REPLY = 'YES' THEN
          SET_ITEM_INSTANCE_PROPERTY ('ALARM.QUESTION_UK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'ATT_GREEN');
     SET_ITEM_INSTANCE_PROPERTY ('ALARM.REPLY_UK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'ATT_GREEN');
END IF;

Hi when i wrte this
IF :ALARM.REPLY = 'NO' THEN
     SET_ITEM_INSTANCE_PROPERTY ('ALARM.QUESTION_UK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'ATT_RED');
     SET_ITEM_INSTANCE_PROPERTY ('ALARM.REPLY_UK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'ATT_RED');
ELSIF
     :ALARM.REPLY = 'YES' THEN
          SET_ITEM_INSTANCE_PROPERTY ('ALARM.QUESTION_UK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'ATT_GREEN');
     SET_ITEM_INSTANCE_PROPERTY ('ALARM.REPLY_UK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'ATT_GREEN');
END IF;
EXECUTE_QUERY;on when-checkbox chenged
then i click on check box it will g and look like hang
Thanks And Regards
Vikas Singhal

Similar Messages

  • PROBLUM IN RESULT OF IF ELSE

    Hi all i have table and data like this
    sale_order_id  QTY     item_type
    12554          58     DYEING
    12554          30     CUTTING
    12554          58     PRINTINGAND MY CODE IS LIKE THIS
    DECLARE
         a_qty NUMBER;
         a_sale_order_no VARCHAR2(100);
         a_item_type VARCHAR2(100);
      CURSOR gin_c IS SELECT gd1.sale_order_id,SUM(nvl(gd1.s,0)+nvl(gd1.xs,0)+nvl(gd1.m,0)
                                                  +nvl(gd1.l,0)+nvl(gd1.xl,0)+nvl(gd1.pcs,0)) qty,gin.item_type
                    FROM gin,gin_detail1 gd1
                    WHERE gin.id=gd1.id and sale_order_id=:sale_order_no
                    GROUP BY gd1.sale_order_id, gin.item_type;
    BEGIN
         open gin_c;
         LOOP
         fetch gin_c INTO a_sale_order_no,a_qty,a_item_type;
         IF a_qty IS NULL THEN
              :item6:='NOT_PROCESSED';
         ELSIF a_qty<>:item and UPPER(a_item_type)=UPPER('dyeing') THEN
              :item6:='PROCESS In DYE';
         ELSIF a_qty<>:item and UPPER(a_item_type)=UPPER('CUTTING') THEN
              :item6:='PROCESS In CUTTING';
      ELSIF a_qty<>:item and a_item_type='PRINTING' THEN
              :item6:='PROCESS In PRI';
         ELSE
              :item6:='dddddd';
         END IF;
              EXIT when gin_c%NOTFOUND;
         END LOOP;
         CLOSE gin_c;
    end;:item6 get the value dddddd but as per my table data the result must be 'PROCESS In CUTTING.
    Please Guide
    Thanks And Regards
    Vikas

    a_qty:item and UPPER(a_item_type)=UPPERWhat exactly is this condition testing for? I get the and UPPER(a_item_type)=UPPER..., but what does IF a_qty:item checking? Does this code compile? I'm not familiar with this notation. Your first check is to ensure a_qty is not null. Do you care what the quantity is if it is not null? I believe this might be where your bug is because you are simply checking that a_qty:item is TRUE (it has a value) and the item type matches a condition. If a_qty simply has to have a value, you could simplify your code. For example:
    DECLARE
       CURSOR gin_c IS
          SELECT gd1.sale_order_id
                 ,SUM(nvl(gd1.s,0)+nvl(gd1.xs,0)+nvl(gd1.m,0)
                     +nvl(gd1.l,0)+nvl(gd1.xl,0)+nvl(gd1.pcs,0)) qty
                 ,gin.item_type
            FROM gin,gin_detail1 gd1
           WHERE gin.id=gd1.id and sale_order_id=:sale_order_no
           GROUP BY gd1.sale_order_id, gin.item_type;
    BEGIN
       FOR rec IN gin_c LOOP
          IF ( rec.qty IS NULL ) THEN
             :item6:='NOT_PROCESSED';
          ELSIF ( rec.qty = 'something' AND UPPER(rec.item_type) = 'DYEING' ) THEN
             :item6:='PROCESS In DYE';
          ELSIF ( rec.qty = 'something' AND UPPER(rec.item_type) = 'CUTTING' ) THEN
             :item6:='PROCESS In CUTTING';
          ELSIF ( rec.qty = 'something' AND UPPER(rec.item_type) = 'PRINTING' ) THEN
             :item6:='PROCESS In PRI';
          ELSE
             :item6:='dddddd';
          END IF;
       END LOOP;
    END;Craig...

  • Problum in calling report

    Hi all i ahve problum in calling report in forms9i and report 9i when button pressed
    the code of when-button-pressed is
    DECLARE
         repid REPORT_OBJECT;
         v_rep VARCHAR2(1000);
         rep_status VARCHAR2(20);
    BEGIN
              repid := FIND_REPORT_OBJECT('REPORT46');
    --     Message('repid:', NO_ACKNOWLEDGE);
              set_report_object_property(repid,report_other,'P_DATE_TWO='||:GIN.second_date
              ||' P_DATE_ONE='||:GIN.first_date||' P_DEPARTMENT='||:GIN.department||' P_FABRICATOR_NAME='||:GIN.fabricator);
              v_rep := RUN_REPORT_OBJECT(repid);
              rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /*Display report in the browser*/
    WEB.SHOW_DOCUMENT('http://zensol-0d8148f7:8888/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
    ELSE
    message('Error when running report');
    END IF;
    PAUSE;
    END;
    and sql query for the report is this there are four user parameters and all are initialized in when button preesd code
    SELECT s.code,s.name,gin.prod_name,gin.color,gin.sale_order_id,gin.issue_date,gin.item_type,
    sum(gin.total_issue),sum(grn.total_receive) FROM
    (select g.item_type,g.supplier_code,g.supplier_name,gd1.prod_id,gd1.prod_name,
    gd1.color,
    gd1.sale_order_id,g.issue_date,
    (gd1.xs
                   + gd1.s
                   + gd1.m
                   + gd1.l
                   + gd1.xl
                   + gd1.pcs) AS total_issue from gin g,gin_detail1 gd1
    where g.id=gd1.id  and upper(g.item_type) like '%'||:p_department||'%'
    )gin,
    (select g.item_type,g.supplier_code,gd1.prod_id,gd1.prod_name,
    gd1.color,
    gd1.sale_order_id,
    (gd1.xs
                   + gd1.s
                   + gd1.m
                   + gd1.l
                   + gd1.xl
                   + gd1.pcs) AS total_receive from grn g,grn_detail1 gd1
    where g.id=gd1.id  and upper(g.item_type) like '%'||:p_department||'%'
    )grn,supplier s
    where gin.supplier_code = s.code
       AND grn.supplier_code = s.code
          AND gin.sale_order_id = grn.sale_order_id
       AND gin.prod_id = grn.prod_id(+)
    AND s.name like  '%'||:p_fabricator_name||'%'
    AND gin.issue_date between :p_date_one and :p_date_two
    GROUP BY s.code,s.name,gin.prod_name,gin.color,gin.sale_order_id,gin.issue_date,gin.item_type
    Please help
    Thnaks And Regards
    Vikas Singhal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    hi
    i pass this code and get error 500 internal server error
    WEB.SHOW_DOCUMENT('http://zensol-0d8148f7:8888/reports/rwservlet/getjobid'||
    'server=repserver90','_blank');
    500 Internal Server Error
    java.lang.NumberFormatException: server=repserver90
         at java.lang.Integer.parseInt(Integer.java:414)
         at java.lang.Integer.parseInt(Integer.java:463)
         at oracle.reports.rwclient.CommandManager.handleCmdGetjob(CommandManager.java:1219)
         at oracle.reports.rwclient.CommandManager.handleWebCommand(CommandManager.java:369)
         at oracle.reports.rwclient.RWClient.handleWebCommand(RWClient.java:661)
         at oracle.reports.rwclient.RWClient.processRequest(RWClient.java:1063)
         at oracle.reports.rwclient.RWClient.doGet(RWClient.java:225)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:244)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:523)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:64)

  • HT201272 I purchased songs from iTunes Radio on my iPhone, but now the only place they will show up is in the iTunes Store app on my phone, even after syncing to my computer a million times, the songs do not show up in my library or anywhere else.

    I purchased songs from iTunes Radio on my iPhone, but now the only place they will show up is in the iTunes Store app on my phone, even after syncing to my computer a million times, the songs do not show up in my library or anywhere else. My phone is not syncing properly, I wanted to add another playlist to it that I created on my Mac. I pluged in my phone and made sure the playlist I wanted to add was checked to be on my phone when I synced.
    The playlist I wanted to add was "Country." It is clearly checked. I also wanted to add the "Recently Added" playlist, which I also checked before sycing. Currently, my phone only has the "Purchased" playlist and my "All Songs" playlist on it. When I hit sync, iTunes added another playlist automatically added another playlist to the list above and checked it. It was titled "ALL SONGS 1" and had ten fewer songs in it than the playlist I had created, "ALL SONGS" had. This playlist, however does not show up on my phone after syncing, nor does "Country" or "Recently Added." (Every time I sync, another playlist is created as "ALL SONGS 2, 3, 4, etc.") One of the songs (I have not, yet checked the other songs) that I purchased from within iTunes Radio shows up in the "ALL SONGS 1" on this screen:
    But does not show up anywhere else. This playlist does not show up anywhere but the two screens above. The ALL SONGS 1 or 2 playlists do not show up here:
    When I search for those song in my library, it shows that I do not have them:
    But if I go to the iTunes store, I get the play button and not the price of the song:
    This is what things look like from my phone's side of things:
    "Summertime Sadness," one of the songs I bought from iTunes Radio, does not show up in the iTunes store under purchased "All" or "Not on This iPhone"
    But, it does show up under "Recent Purchases"
    Also, this is what playlists are on my phone after syncing a million times:
    Only what was on there before I started any of this. "Summertime Sadness" and the other songs I bought from inside iTunes Radio, do not show up in either of these playlists. Please, help me.

    Hi Petrafin,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots.
    You can download your purchases directly to your computer.
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/HT2519
    Cheers,
    - Judy

  • Mail is froten and wont open or close or allow the restart of the macbook air, everithing else seems to work just fine

    So i'm having trouble with the mail app it won't open or closo or do anything at all. so icant instal the updates of other apps, but everithing else works just fine
    I would apreciate any suggestions

    OS X: How to quit an unresponsive application using Force Quit

  • Sum function within if/then/else (xdofx:if)

    I'm attempting to display a total at a particular group within my report. This total is conditional and should choose to display a placeholder value or the sum of another placeholder value (in a child group).
    I have been able to vary my output based on the value I want to check: FIXED_QUOTE_FLAG - I have the if/then/else working in a simplified fashion
    I can display literals and some placeholders correctlly eg. print a literal value of 00110011 or the value of placeholder QUOTED_PRICE
    I can also display a calculated placeholder, using sum within the group I am concerned with: sum (current-group()/ACTIVITY_CHRG)
    But when I try to get everythign working together ...
    I cannot get the sum to work inside the if/then/else condition. The result is NULL (blank in HTML output).
    The following is the snippet which is not working correctly:
    <?xdofx:if FIXED_QUOTE_FLAG = 'Y' then QUOTED_PRICE else sum (current-group()/ACTIVITY_CHRG) end if?>
    Message was edited by:
    gareth_adamson

    To answer you first question, perhaps sum is not a supported function in the xdofx namespace. It's annoying when this problem comes up because xdofx namespace seems to be the only way to do if then else clauses. I'm not entirely certain on the above, but you could resort to using BI Publisher's built-in if statement.
    For your problem, something like this:
    <?if: FIXED_QUOTE_FLAG='Y'?>
    QUOTED_PRICE
    <?end if?>
    <?if: FIXED_QUOTE_FLAG!='Y'?>
    <?sum(current-group()/ACTIVITY_CHRG)?>
    <?end if?>
    EDIT:
    There is a way to do if else without xdofx namespace. It is done with <?choose:?> <?when:?> and <?otherwise:?> tags. Here is example syntax copied from Tim Dexter's blog:
    <?choose:?>
    <?when:count(TRX_NUMBER) > 0?>
    Invoice Table
    <?end when?>
    <?otherwise:?>
    No Data Found
    <?end otherwise?>
    <?end choose?>
    To answer the second question about a running total, you will need to use the <?xdoxslt:set_variable($_XDOCTX,'var_name',var_value)?> and the <?xdoxslt:get_variable($_XDOCTX,'var_name')?>. This method of working with variables is the only method that allows you to update a variable. This makes it good for running totals. Consult the official user guide under "Creating an RTF Template" the section about using variables and calculating running totals.
    So, in your problem, once you get the first part working, you will have to add that value to your running total. It will look something like this:
    <?xdoxslt:set_variable($_XDOCTX,'running_total',xdoxslt:get_variable($_XDOCTX,'running_total') + conditional_value)?>
    Remember to initialize the running total to zero! Hope this helps.
    Thanks,
    Matt Soukup
    Message was edited by:
    Matt Soukup

  • How can I move bookmarks from one computer to another.  JUST BOOKMARKS, NOT ANYTHING ELSE

    How can I move Bookmarks from my MacBook Pro to my iMac; just Bookmarks, nothing else.

    Safari Bookmarks?
    Export bookmarks as a HTML file to a usb stick or something.
    Put the USB in your other computer and import bookmarks 

  • How do I replace someone else's Mac ID with my own? Bought iPhone second hand. Previous owner re-set the phone but his ICloud account stayed on now my phone. He uses his macID on his new iPhone now?? Any ideas, as this issue is blocking my access to iTune

    How do I replace someone else's Mac ID with my own?
    Bought iPhone second hand on TradeMe.
    Previous owner re-set the phone but his ICloud account stayed on now my phone. He uses his AppleID on his new iPhone now and, understandably, does not want to give me his password. Any ideas?? Please.
    This issue is blocking my access to iTunes and any other file from my home computer. It keeps on telling me that I have to autorise my computer to pass on files, yet, it seems, for all this to happen, I need to get logged in through the phone's Apple ID. This of course is different to my one on my computer - and I have no password for it.
    This phone is not stolen!! I payed still a fair bit for it. Am still in contact with the previous owner. He doesn't know how to fix the problem either.
    Would appreciate any suggestion ????
    Thanks
    SamSings

    Settings>general>resets>erase all content and settings.
    That will put it back to its out of the box state. Set it up with your own apple Id.

  • How can someone else have the same iCloud email address as me?

    I registered for my iTools account as soon as they were offered and have had the same email address ever since.
    My account has not been hacked and I regularly change my password for the account.
    I frequently get emails from Apple notifying me that someone has attempted a password reset on my account.
    I have over the past two years received a steady stream of emails correctly addressed to me, but obviously meant for other folks.
    Some in the US and others in Europe and beyond.
    The emails contain payslips, mortgage offers, confirmation of appointments for restaurants and car servicing.
    Having read these and many other forums, I believe Apple, like Google allow the use of the same email address by multiple people.
    This may be because even if the desired mac.com or iCloud.com or me.com addresses are unavailable, Apple allows an alias to be created.
    This should not be the case.  At least to my mind it should not be so.
    I am most concerned that if I am able to receive their emails, they may be receiving mine.
    I pay for Apple's services and expect them to be secure.
    Anyone else feeling uneasy about this?

    It's most unlikely that anyone else has your address: if your address (obviously don't post it here) uses a fairly common name as many of the early ones do, then you are liable to get idiots coming to the conclusion that they own it because their name is the same. They give it out, and you get their messages. It sounds insane, but it does happen quite a bit - people can be quite incredibly stupid.
    It's unlikely that anyone is receiving your email, particularly as you've changed the password. You should contact Apple as even if it's the case I've described it counts as a security issue, though it's not that easy to see what can be done about it.
    This Apple Help page provides contact information for various countries for security problems with an Apple ID:
    http://support.apple.com/en-us/HT5699

  • HT4970 does any one else miss the month at a glance that the old version of reminders had? I wish Apple would bring that feature back.

    Does anyone else miss the month-at-a-glance feature from the old version of Reminders app? I wish Apple would bring that feature back. It made it very convenient to schedule for the future.

    You  can send feedback and let Apple know
    http://www.apple.com/feedback/

  • If the wifi on my iPod Touch is on nothing else on the router will connect to the internet

    Ever since I updated my iPod Touch 4th Gen to iOS 6, If the wifi on my iPod Touch is on nothing else on the router will connect to the internet..
    It's the weirdest thing.
    My Wired and WiFi computers are experiencing DNS errors, unresolved URLs and in general having difficulty connecting to the internet...
    That is.... UNTIL I SHUT OFF THE WIFI ON MYiPOD 4th Gen TOUCH!!!
    Then everything works fine.
    I've reset my router, several times.
    I've reset my Cable Moden, several times.
    The problem persists until I disable the WiFi on my iPod

    Try the following:
    - A reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory settings/new iPod.

  • Can't get photos onto iPod. Everything else is OK.

    When I try syncing photos from iTunes to my iPod I get the "The disk could not be read from or written to." error message. Everything else gets synced (music, video, podcasts).
    I tried reseting my iPod, rebooting Windows, the software was just installed when I got the iPod so it should be fresh.
    Any ideas?

    Hello . I have the exact same problem . After playing with reset - reinstall and speaking to apple directly for over 2hrs. I have found that there is no simple solution . It must be an Xp problem . Customer support suggested that the problem may be remedied if I create a new Xp user and reinstall to that user . It did not work . However - if you want to get pictures on your ipod and you can get videos on your ipod then do as follows - use microsoft movie maker - free with Xp - to make a slideshow of your photos . Then convert the .avi slideshow into ipod format . Put the video slideshow on your ipod and enjoy . You can pause during the slideshow to show people individual pictures . Just a note I can now no longer get podcasts on my 30g video ipod . Starting to wish I kept my hassle free , itunes free flash usb mp3 player .

  • Following upgrade to osx 10.8.2 on my mac mini I can no longer connect to icloud, I wouldn't mind so much but I have come to rely on th eicloud services to manage my work and home services, has any1 else experienced this and has any1 any solutions?

    following upgrade to osx 10.8.2 on my mac mini I can no longer connect to icloud, I wouldn't mind so much but I have come to rely on th eicloud services to manage my work and home services, has any1 else experienced this and has any1 any solutions as this is messed up all of my work relations?

    Had the same problem this morning after updating to 10.8.2. Mail was finding my dot-mac account as always, but System Preferences popped up and said my iCloud password was incorrect. Did the "forgot password" reset, but still had the same problem. Then I went to icloud.com in Safari, logged in with the new password, it worked no problem. So I went back to the icloud preference pane, signed out of icloud, answered yes to all the warnings about data being deleted from my mac, blah blah blah, then re-signed in to icloud. Everything worked. I did have to set up my icloud account in Mail again, which now lists the account mailbox as "iCloud", and not "mac.com" as it did before. But so far, everything is working (fingers crossed.)

  • I can no longer synch music library and audio books, it says can only be synched with one of the libraries, anyone else had this?

    i had to reboot my laptop, so reloaded itunes sofware, im now finding that when i'm synching my Iphone to synch audio books ive downloaded, , it says its synched with another itunes library ( my music) do i want to erase this iphone and lsynch with this iphone library, the music percentage at the bottom reduces to 0% in prep to erase.
    anyone else got this problem?
    Lee

    try a new/fresh apple brand cable and make sure it is the only usb cable in use. this worked for me, i noticed i had no problem with a lighting cable. i did a restore from scratch and from backup and it did not help me...and if you cant sync than you wont be able to get anything but apps back after the restore

  • How do i reset my master password on MacBook Pro previously owned by someone else?

    I purchased from someone else in 2011 and needed to reset master password.  It was done, but now I am having problems resetting it.  It does not recognize the reset password.  I am trying to add new software and can't do so without password.  Can someone please help me?  I entered to change in terminal window, but when it comes to adding new password, computer won't allow to add new passcode in blank. 

    Check out KB Articles http://support.apple.com/kb/HT1274 Changing or resetting an account password and http://support.apple.com/kb/PH11390 OS X Mountain Lion: Reset a login password  if you are using ML.  You never stated which OS you are currently using. 

Maybe you are looking for