Display an alert message through javascript when report column item is null

Hello,
I have a report column item which is an select list item and now i want to display an alert message when value is null, I mean no value is selected, this alert message should be fired when update button is clicked.
Can anyone please help me with this issue.
Thanks,
Orton

You could try something like this:
declare
  x        INTEGER;
  err_ct  INTEGER   := 0;
begin
  x  := 5;  -- number of rows displayed
  for i in 1 ... x (
    IF wwv_flow.g_f08(i)) IS NULL THEN err_ct  := err_ct + 1;
    END IF;
  end loop;
  IF err_ct = 0 THEN
     RETURN NULL;
  ELSE
    RETURN 'Nice error message: you must supply a value.';
  END IF;This would be used with a PL/SQL validation: Function Returning Error Text.

Similar Messages

  • Display an Alert message in PL/SQL block in APEX

    Hi,
    we are getting an oracle exception while inserting a new row. As it is having the unique constaint on a coulumn.
    Now the problem iis we need to Display an "Alert message" based on the input field validation. That java script code for alert has to be embeded nside a PL/SQL block in Oracle APEX Application.
    we tried doing this with below code:
    Begin
    INSERT INTO <<table name>>(ID,NAME) VALUES (s1,:TXT_s2);
    exception when others then
    htp.p('<script language="javascript">');
    htp.p('alert("Exception");');
    htp.p('</script>');
    end;
    If anybody knows .... please reply.
    Thanks,
    Subarna
    Edited by: user9955252 on Apr 21, 2010 1:47 AM

    Hello,
    APEX Forum is here : Oracle Application Express (APEX)
    Regards

  • Display an Alert message from PL/SQL block in APEX

    Hi,
    we are getting an oracle exception while inserting a new row. As it is having the unique constaint on a coulumn.
    Now the problem iis we need to Display an "Alert message" based on the input field validation. That java script code for alert has to be embeded nside a PL/SQL block in Oracle APEX Application.
    we tried doing this with below code:
    Begin
    INSERT INTO <<table name>>(ID,NAME) VALUES (s1,:TXT_s2);
    exception when others then
    htp.p('<script language="javascript">');
    htp.p('alert("Exception");');
    htp.p('</script>');
    end;
    If anybody knows .... please reply.
    Thanks,
    Subarna

    If your end goal is showing a pretty error message instead of the message that the tables unique constraint raises try the following. This logic will show a nice message and not try to insert non-unique data.
    (1) Create a validation of type "Function Returning Error Text".
    (2) Place similar code like the following in your validation. Notice that if the unique name does not exist the no_data_found returns null allowing the validation to pass.
    DECLARE
      v_error varchar2(100);
    BEGIN
      SELECT 'A person by this name already exists.'
      INTO v_error
      FROM your_table
      WHERE your_name = :P1_YOUR_NAME;
      RETURN v_error;
    EXCEPTION
      WHEN no_data_found THEN
        RETURN NULL;
    END;

  • How displaying an alert message called from a database procedure

    Hi,
    How can I display an alert message that is called from a database procedure.
    I've tried the following code:
    l_al_button NUMBER;
    l_al_message VARCHAR2(80);
    l_al_id ALERT;
    Set_Alert_Property(l_al_id, alert_message_text,l_al_message);
    l_al_Button := show_alert(l_al_id);
    When trying I receive an error that says that the word ALERT need to be declared.
    Any suggestions?
    Thanks

    Hi,
    leave the procedure without error handling.
    This is what you can do:
    1.Inside the database procedure-
    BEGIN
    RAISE_APPLICATION_ERROR (-20001, 'The chosen length of the Public Key Exponent ....');
    END;
    2.Into your Form -
    BEGIN
    EXCEPTION
    WHEN OTHERS THEN
    IF sqlcode = '-20001' THEN
    Display Your Messages.
    END IF;
    Monica
    END;

  • How to display an alert message on click of link in tableview

    Hi,
    Following is the code for a tableview in layout section of a BSP( i have specified only one tableview column here). The requirement is to display an alert message on click of link in the first column that is "evbeg". Can anyone please help me how to achieve this? Appreciate quick response on this.
    CREATE OBJECT lr_dateiterator TYPE cl_lso_bsp_it_trdates
                EXPORTING im_application = application
                im_tform = trainingform.
            <htmlb:tableView id            = "dates"
                                 table         = "<%= dates %>"
                                 iterator      = "<%= lr_dateiterator %>"
                                 width         = "100%"
                                 rowCount      = "<%= lp_len %>"
                                 footerVisible = "FALSE"
                                 sort          = "SERVER" >
                  <htmlb:tableViewColumn columnName    = "evbeg"
                                         type          = "user"
                                         title         = "<%= otr(LSO_FRONTEND/schedule) %>"
                                         tooltipHeader = "<%= otr(LSO_FRONTEND/schedule) %>"
                                         sort          = "TRUE" >
                  </htmlb:tableViewColum>
    Thanks and Regards,
    Archana.

    you have to code in the iterator for this.
    in the render_cellstart method of the iterator you need to code.
    this is for a column.
    when 'MATNR'.
    data: text type string.
    text = 'disp_alert()'.   "this java script i placed in the page
    data: lo_link type ref to cl_htmlb_link.
      create object lo_link.
         lo_link->id = p_cell_id.
         lo_link->onclientclick = text.
         lo_link->text = <fs>-matnr.
         p_replacement_bee = lo_link.
    below is the java script i added in my page..
    <  sc ri   pt type="text/javasc ript"   >
    f u n  ction disp_alert()
    a  l e  rt("helloworld");
    < /s  c ript >

  • Javascript in report column headings?

    Hello,
    I'm wondering if it's possible to be able to use Javascript in report column headings, so that when the user hovers the mouse over the column heading name in the report, a pop-up appears with an explanation of what that column is. Usually I use Javascript on page items, but in this case, the column headings aren't page items, they are derived from the SELECT statement that makes the report. Is this possible using Javascript? Or, is there something I'm not aware of that Apex can do, such as the "Optional Label with Help" but for column heading names?
    Thank you,
    Laura

    Hello Laura,
    Each report column headings has an ID equal to the column name/alias as it appears in your select statement. You can use this ID to directly access the column header DOM node, just as you are doing with a page item.
    In your case, you can use the ‘title’ attribute to get what you want. If your column ID is ‘COL1’, you can use something like this in the footer of your report region:
    $x(‘COL1’).title = ‘Help Text’;Of course, having an ID allows you to use any JavaScript code you need.
    Hope this helps,
    Arie.

  • Display picture in messages totally  pixelated when seeing it with yahoo messenger for windows

    Hello,
    I'm using messages to chat with my yahoo messenger account  at work and yahoo messenger for windows at home.
    When I log into Yahoo with messages, my yahoo display picture is updated automatically with the one I have choose in messages.
    My problem is that this picture is totally pixelated when you see it on yahoo messenger for windows. It seems that Messages is changing its size.
    As the size in Yahoo messenger for windows is bigger it appears pixelated!
    If I choose no display picture in messages, the one I have choose with yahoo messenger for windows disappear when I'm logging with it.
    Is there a way that messages do not update the display picture each time I'm logging to Yahoo?
    I suppose that there is no solution to this problem but I wanted to be sure.
    Anyway thanks for your help.

    HI,
    Thanks for the Path.
    This does seem to show all the Recents from the Contacts App > My Card, the Login Pic and the Messages Buddy List pic.
    I think in Mountain Lion these were either separate items  or the .plist that is in the current place listed the app/location the pic was used.
    I have looked at the pictures in the folder (.png and thumbnail .tiffs) and the .plist and it does seem to be all the pics I have used in all three places over the last few months.
    The Yahoo account is logged in not through IMAgent that FaceTime and Messages use for other Accounts but from the IMServicePluginAgent.
    In Mountain Lion this used to list a Buddy Pic server as well as a straightforward login.
    Using Little Snitch I am not seeing that in Mavericks.
    Seems you may have to change your Pic on a web page for your Yahoo account.
    Edit
    for the Points
    9:22 pm      Friday; November 8, 2013
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    Message was edited by: Ralph Johns (UK)

  • My ipad was is displaying an alert message " A wi-fi connection is required to download your apps and media". So it has been connected to the internet over night and this morning but is still displaying the alert message and it won't go away. what to do?

    Hi,
    My name is Norbert. I am having some difficulties restoring my icloud back up. My ipad was doing an icloud back up and the alert message displayed on the ipad after my internet was interrupted "A wi-fi connection is required to download your apps and media".
    I got the internet working, my ipad is receiving internet network but the alert message is still displayed on the ipad and won't go away, to make matters worse the ipad is frozen and i can't do anything.
    Please can anyone with a similar experience tell me what to do in this situation?
    Thank you

    Welcome to the Apple Community.
    Have you tried a hard restart. Press the on/off button and homescreen buttons together until the device shuts down.

  • Alert message in javascript if drop down in 1 column is blank and other column is not blank

    What I’m trying to do is have a java window alert pop up if the PNR column is blank and the BOM column is not blank on each row. I also put a cold fusion If statement around this javascript that the CN_Entry column in the Items table has to be an “N”. This code all actually works, but it only works on the row with the latest or newest item with an “N” in the CN_Entry column. I would like this to work on every row, so that if someone does this on any row, or multiple rows, this alert box will keep popping up until all the conditions are satisfied. What do I need to change to make this javascript work? Thanks.
    <cfif CN_Entry EQ "N">
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function verify() {
    var themessage = "Please enter ";
    if (EditItem.PNR_Approval_Initials#ItemID#.selectedIndex == 0 && EditItem.BOM_Approval_Initials#ItemID#.selectedIndex > 0)
    alert("You must enter some PNR initials for ECO #ECID_SPEC# Part Number: #Part_Number#");
    EditItem.PNR_Approval_Initials#ItemID#.focus();
    return (false);
    else
    document.EditItem.submit();
    //  End -->
    </script>
    </cfif>
    Andy

    The first thing you have to do is to remove the ColdFusion conditional logic.  ColdFusion runs on the server.  JS runs on the client.
    The next thing is to call the function from an event that happens on the web page.  form onsubmit seems like a good choice.

  • Sending Alert messages through mail

    Hi all,
    After configuring alerts and got the relavent messages, I need to send some alert messages to perticular persons.
    How and where I should configure this.
    If anyone is having related information would be very useful to me.
    Venu

    Hi,
    <i>I need to send some alert messages to perticular persons</i>
    Did you have a look at,
    /people/aravindh.prasanna/blog/2005/12/23/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part--1
    This is the best one assuming you have already configured alerts.
    "Configuring scenario specific E-mail alerts in XI-CCMS"
    And also
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    Regards,
    Anirban.

  • Alert message through the sdk.

    hi.
    plz have a look on Attached image..
    i want to send one alert to the particular user.
    i am able to send it..
    but here i have  a small  requirement.
    Normally alert messages are Working on queries..
    suppose
    select docentery from ordr where docsttus='open''..
    docentry will be popup
    if i select the docentry  sales order will be pop up.
    the below code i am able to send it...
    but
    i want to attach  the below query....just like a normal alert message
    select docentery from ordr where docsttus='open''..
    can i do it...
    Dim msg As SAPbobsCOM.Messages = Nothing
                    msg = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oMessages)
                    Dim lretvel, errcode As Long
                    Dim errmsg As String
                    Dim orec As SAPbobsCOM.Recordset
                    orec = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                    orec.DoQuery(" select  U_apmuc  from [@TI_BITEMASAPR1]")
                    For i As Integer = 1 To orec.RecordCount
                        Dim ousercode As String = orec.Fields.Item(0).Value
                        msg.MessageText = "Mess"
                        msg.Subject = "subj"
                        msg.Recipients.Add()
                        msg.Recipients.SetCurrentLine(0)
                        msg.Recipients.UserCode = ousercode
                        msg.Recipients.NameTo = ousercode
                        msg.Recipients.SendInternal = SAPbobsCOM.BoYesNoEnum.tYES
                        msg.Add()
                        orec.MoveNext()
                    Next
                    If lretvel <> 0 Then
                        ocompany.GetLastError(errcode, errmsg)
                        MessageBox.Show(errcode.ToString + " :: " + errmsg)
                        ' Else
                        ' MessageBox.Show("Success")

    Hi
    In this case you can't use the SAPbobsCOM.Messages object to send the message. You have to use the MessageService where you can define columns and add rows.
    Check the following code:
    Dim msgServ As SAPbobsCOM.MessagesService
    Dim oMessage As SAPbobsCOM.Message
    Dim DataColumn As SAPbobsCOM.MessageDataColumn
    Dim oRecordset As SAPbobsCOM.Recordset
    Try
      oRecordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
      msgServ = oCompany.GetCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.MessagesService)
      oMessage = msgServ.GetDataInterface(SAPbobsCOM.MessagesServiceDataInterfaces.msdiMessage)
      oMessage.Subject = "subj"
      oMessage.Text = "Mess"
      oMessage.Priority = SAPbobsCOM.BoMsgPriorities.pr_Normal
      oRecordset.DoQuery("select  U_apmuc  from [@TI_BITEMASAPR1]")
      If oRecordset.RecordCount > 0 Then
           oRecordset.MoveFirst()
           For ii As Integer = 0 To oRecordset.RecordCount - 1
                With oMessage.RecipientCollection.Add()
                     .SendInternal = SAPbobsCOM.BoYesNoEnum.tYES
                     .UserCode = CStr(oRecordset.Fields.Item(0).Value)
                     .UserType = SAPbobsCOM.BoMsgRcpTypes.rt_InternalUser
                End With
                     oRecordset.MoveNext()
           Next
           DataColumn = oMessage.MessageDataColumns.Add
           DataColumn.ColumnName = "Order No."
           DataColumn.Link = SAPbobsCOM.BoYesNoEnum.tYES
           oRecordset.DoQuery("SELECT DocEntry, ObjType, DocNum FROM ORDR WHERE DocStatus = N'O'")
           If oRecordset.RecordCount > 0 Then
                oRecordset.MoveFirst()
                For ii As Integer = 0 To oRecordset.RecordCount - 1
                     With DataColumn.MessageDataLines.Add
                          .Value = oRecordset.Fields.Item("DocNum").Value
                          .Object = oRecordset.Fields.Item("ObjType").Value
                          .ObjectKey = oRecordset.Fields.Item("DocEntry").Value
                     End With
                               oRecordset.MoveNext()
                Next
                msgServ.SendMessage(oMessage)
           End If
         End If
    Catch ex As Exception
         MsgBox(ex.Message)
    End Try
    Regards,
    Csaba

  • Javascript - Referencing report column value

    Hi,
    In my application I have a report "Test" with some columns. In column "PFT_PCODE" the possible values are either 1 or 2.
    What I want is to display the report table cell in red, if the value in "PFT_PCODE" is 1, or the table cell in orange, if the value in "PFT_PCODE" is 2, respectively.
    I tried to make something in Javascript, based on a Vikas' example. I put in the
    Region Header:
    <style type="text/css">
    .rot {
    background-color: red;
    .orange {
    background-color: orange;
    </style>
    Region Footer:
    <script type="text/javascript">
    var spans=document.getElementsByTagName('span');
    for (var j=0;j<spans.length;j++) {
    if (spans[j].className=='farbe') {
    var td=html_CascadeUpTill(spans[j],'TD');
    if (document.getElementsById('#PFT_PCODE#').value == 1) {
    td.className = 'rot';
    else {
    td.className = 'orange';
    </script>
    The column "PFT_PCODE" is marked as CSS class "farbe".
    Unfortunately it's not working, I'm not sure if I reference the report column value right. Since I'm a beginner in Javascript I would be glad for help.
    I put my (reduced) application on apex.oracle.com for testing.
    Workspace: app
    Login: [email protected]
    PW: riponi
    Thanks in advance,
    Roger

    Hi Roger,
    In your report, if you do a View Source, do your report headers have id's on them - that is, the TH tags that contain the headings?
    If so, you could use:
    &lt;script type="text/javascript"&gt;
    function hilite(f1)
    var h = document.getElementById(f1);
    var t = h.parentNode;
    while (t.tagName != 'TABLE')
      t = t.parentNode;
    var rows = t.rows;
    var k;
    var j;
    var c;
    var headers = t.getElementsByTagName("TH");
    for (k = 0; k &lt; headers.length; k++)
      if (headers[k].id == f1)
        c = k;
    for (k = 1; k &lt; rows.length; k++)
      j = rows[k].getElementsByTagName("TD")[c];
      if (j.innerHTML == '2')
        j.style.backgroundColor = 'purple';
        j.style.color = 'yellow';
      if (j.innerHTML == '1')
        j.style.backgroundColor = 'red';
        j.style.color = 'white';
    &lt;/script&gt;Put that in the page's HTML Headers setting.
    In the report region's Region Footer, add in:
    &lt;script type="text/javascript"&gt;
    hilite('PFT_PCODE');
    &lt;/script&gt;This will find the heading's TH cell, work out where it is in the row, then loop through all remaining rows and check the TD cell in the same column, highlighting the cell using background and font colours.
    Andy

  • Auto calculate column item when another column items are changed in report

    Hello,
    I have a report which consists of some editable text items. These editable items correspond to different columns in the table. Now in the report I want to make one column item to be automated so that it can perform some calculations based on other columns data entered by the user in the report. Like, for example if the user changes text item data for col3, col4 then it should automatically perform the calculations for col10 ; similar to onchage event. Consider a situation where in a user comes and enters data in the report throught the text item for col3, so whenever user changes the data for col3 it should perform the calculations for col10 automatically.
    Can anyone please help me with this issue.
    Thanks,
    Orton

    can anyone please help me with this one.
    thanks,
    Orton

  • I have updated to latest version of Firefox but my start screen continues to display the "alert" message stating I am no longer protected and need to upgrade to latest version. Please advise

    As stated above

    Your UserAgent string in Firefox is messed up by something that you installed, and it looks like you are using Firefox 3.0.11. <br />
    [http://en.wikipedia.org/wiki/User_Agent]
    type '''about:config''' in the URL bar and hit Enter <br />
    ''If you see the warning, you can confirm that you want to access that page.'' <br />
    Filter = '''general.useragent.''' <br />
    Right-click the preferences that are '''bold''', one line at a time, and select '''''Reset'''''. <br />
    Then restart Firefox

  • How to set an application item when report column link is clicked?

    I am trying to set the short name of a bread crumb entry when I drill into a detail from an interactive report page.
    The master report has a column link with target = detail - "page in this application"
    I can pass page items through the URL and they are set on the target page.
    How can I set an application item before the target page is called?
    Is there a way to set a process before the link is followed?

    Kenneth,
    I'm not totally sure that I understood the question but, it soounds like you want to set the value of some page items on the page that is opened when you click a link on a column in the master window. Is this right?
    If so, you can achieve what you want by creating hidden page item(s) on the target page. In the master page, on which every column provides the link, go into Report Attributes, click on the link column and scroll down to the section labeled "Column Link" Within this section, set the link text to the current column value, e.g. #MASTER_REPORT_COLUMN_NAME_HERE#. Set the target to "Page in this Application" and pick the page number for the target window.
    Underneath this you will see a section to set set the value for page items. If you click the flashlight, you can search for the hidden page item that you created above. Use the same value to set it as you did the link text, i.e. #MASTER_REPORT_COLUMN_NAME_HERE#. Do this and let APEX take care of passing the values on the URL.
    On the child page, just set whatever control you want to dynamically pick up the value from the hidden field. For example, if you hidden field where named P4_CLEARER_NAME. You could set the title attribute to "Contact Information for &P4_CLEARER_NAME."
    You need the preceeding "&" and terminating "." around the name of you hidden page item to do this.
    -Joe

Maybe you are looking for