Re: How to suggest a number to a page element

Thanks SvenW. I put something like this default value:

begin
   select DECODE(MAX(COD),null,1,MAX(COD) + 1) 
   into :P17_FIELD_NAME
   from TABLE_XXX;
   return :P17_FIELD_NAME;
end;

where : P17_FIELD_NAME is the field in the form that contains code.

I put a validation to display a user friendly when message put an existing code and press the new button.

After that, when the user select an existing code, I show other fields and I would let the user change and save the record, but I Don t know how to put in update mode. Any idea?

Thank you

bsalvador

some comments to that.

(1) you can use a NVL instead of the decode. This would make select it a lot easier to read.

begin
  select NVL(MAX(COD),0) + 1
  into :P17_FIELD_NAME
  from TABLE_XXX;
  return :P17_FIELD_NAME;
end;

(2) instead of validation, you can use the apex_error package to 'translate' some oracle error messages in a user-friendly message. Typical messages as violations of FK ok UK.

Patrick wrote a great article how to: http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/

Advantage: no need of a high before validation, just react on the error.

(3) the "UPDATE" mode would automatically be if you use a wizard to create a form based on a table. All items will be marked as database fields. And thre will be a page DML process that makes the insert or update.

If you have created the question without the help of the wizard, then compare the attributes of the element, but also the process of page with another page where you have used the form wizard. Identify, understand and fix the differences.

Tags: Database

Similar Questions

  • How to use the value of the page element in other pages too?

    Hi all

    How to pass the value of the item P26_NO from 26 to all other pages (such as 1, 2, 3... 25) using the & P26_NO. ???
    I set the default for this item.but I can't able to find value in the session state itself?

    Please post your suggestion here!

    Thank you and best regards,
    Robette.

    Robette wrote:
    Hi Amelia,.

    Through application process only we can able to save the page element value in session state? is there another way?
    Since my requirement is like I need to display footer text in all the pages, I have the version number included in this text, so I created a table and my intention to create an item and passing the point value for all other pages and see that point value & P26_NO. in the text. Version number is dynamic, it will change at each deployment.
    Is another way simple, other than my approach?

    Thank you best regards &,.
    Robette.

    You should use point demand for it and an application process to fill

    IF :APP_ITEM_NAME IS NULL THEN
      APEX_UTIL.SET_SESSION_STATE('APP_ITEM_NAME','myvalue');
    END IF;
    

    Published by: VC on June 25, 2012 13:48

  • How to suggest a certain number to a page element

    Hi people,

    I have a form in Apex 4.2 with three elements of the page: id, code, description.

    Id is a sequence of oracle, that s ok, but the code is a key to the company, where system will suggest a code but the user can change it, put another value.

    My problem is: how to generate this suggestion in this element of the page? The system needs to offer always the maximum number in this field, and if the user put duplicate values, the system will display a message.

    Thank you.

    bsalvador

    Use a default value on the company code key. The default value can be a select statement finds the max value and adds + 1.

    Put a unique constraint on the column that contains the key to company code. Then the database triggers a UK error, if a duplicate key has been entered. Of cause, you can create you own validation for this, but I would avoid writing code redunant.

  • How to display the number of current page to formcalc?

    I have a client that will not allow JavaScript in their forms for security reasons.  I am trying to convert the JS, I'm used to working with FormCalc instead, but I don't have much experience with the CF and I am stuck at the first hurdle.

    I want to display the current and total pages in the master page and I changed the code generated to use FormCalc and modified to use the reference to the dollar, but the form is not make the current page number.

    Here is the code

    return. #pageSet [0]. Restricted.CurrentPageNumber::ready:layout - (FormCalc, client)

    Does not work, even if it is copied from the reference material

    this.rawValue = xfa.layout.page ($)

    also tried

    $ = xfa.layout.page ($)


    return. #pageSet [0]. Restricted.NumberofPages::ready:layout - (FormCalc, client)

    Work

    this.rawValue = xfa.layout.pageCount)

    Any help would be really appreciated

    Hello

    to get the current page, you can use the index of your master page ("Restricted").

    $ = $. parent.index + 1

    and for the total number of pages, use

    $ = $layout.pageCount)

  • How can I set a value of page element to a column of tabular form field when add line button clicked?

    Hello

    I'm new in APEX. I work with APEX 4.2.

    I have a simple form in a page (page no. 3) and I have another region containing a tabular form on the same page.

    P3_EMP_ID is a part of the area of simple form.

    And there is a column field named 'emp_id' tabular.

    If it is possible that

    When I click on the button "add row", field in the column named 'emp_id' in a table will be filled with the value that is available in P3_EMP_ID?

    Pls someone help me.

    Thnks

    Magali

    Yes, it is possible

    simply to > edit in > attribute report > change empno field tabular > attribute in the form >select and set up according to

    default type: point (the name of the application or page element)

    default: P3_EMP_ID

    I hope this helps...

  • How to specify the opacity of a page element in the script?

    In my following script:

    myDoc var = app.documents.item (0);

    var app.activeWindow.activePage = myPage.

    var myBounds = myPage.bounds;

    var myBounds = pageWidth [3] - myBounds [1];

    var myBounds = pageHeight [2] - myBounds [0];

    myRectangle var = myPage.appliedMaster.rectangles.add ({geometricBounds: [0, 0, pageHeight, pageWidth]});

    myRectangle.fillColor = 'Black ';

    myRectangle.strokeWeight = '0 '.

    I want to change the opacity of the object myRectangle.

    Can someone help me with the correct command to specify the opacity in javascript?

    Hello

    Try this...

    myRectangle.transparencySettings.blendingSettings.opacity = 39;
    

    Concerning

  • How to change the color of a page element, which is a static source

    I have a page element that is not a label, but the source of the element is always static. It will show always INCOMING in this source. ENTERING is coded under Source in the Source value or expression hard. The customer wants the INCOMING to be bolded Word. I added the code ccss to "BOLD" in value, but it is important where I put the value will not be in bold.

    Thank you
    Patti Spycher

    Put the following in the HTML form elements attributes of your

    style="font-weight:bold;color:darkblue;font-family:Courier"
    

    See this example:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:68

    by choosing employees of list selection and running "search".

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • How to change the number of minutes for the exercise of the activity of the application

    How to change the number of minutes for the exercise of the activity of the application

    Hello

    It is not currently possible to change the goal of daily exercise.

    If you want to suggest that Apple consider adding this option, you can submit a request here:

    https://www.Apple.com/feedback/watch.html

  • How to limit the number of printers can be installed on this computer by using Group Policy?

    How to limit the number of printers can be installed on this computer by using Group Policy?

    Hello

    Thanks for asking! If I understand correctly, you should limit the printers installed on the computer by using Group Policy. I suggest you follow the troubleshooting steps to check if this may help.

    The question you have posted is related to Technet and would be better suited to the Technet community. Please visit the link below to find a community that will provide the best support.
    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • How to change the number of values in the hour that are restricted.

    Hello

    May I know how to change the number of values in the hour that are restricted.

    In fact, we have improved of obiee in obiee 11g 10g. Data base is the same for Both.In 10 g the prompt value is limited to show only 35 records per page. As we passed it shows only 35 Records in 11g also. How can I change this limit to 11g.

    Please suggest me! Its urgent!

    Thanks and greetings

    Navnitha

    Hello

    In the advance tab we have the XML of the upgraded report, copy it into a Notepad and try to find the line beginning as below

    In 10g, we have something like below, simply remove the choicesPerPage = '35' from 11 g OBIEE XML report

    Thank you

    RAM

  • How can suggest us a new DBA ECO certification for very large databases?

    How can suggest us a new DBA ECO certification for very large databases?

    This web site, or what phone number can call us to suggest the creation of a certification of VLDB ECO.

    The most important databases that I've ever worked with barely more than 1 trillion bytes.

    Some people told me that the results to be a DBA change completely when you have a VERY BIG DATABASE.

    I could guess that maybe some of the following topics in the configuration can be on it,

    * Partitioning

    * parallel

    * more large block size - MAS vs. OLTP

    * etc.

    Where I could send a recommendation?

    Thank you Roger

    This forum is probably your best choice, Brandye would be one of the contacts I would use to make such a request.  If you are really interested in this, I would be further demand more.  Specifically, most Oracle certifications available to have a corresponding course available in the OU. If you want to create a new certification, one of the most compelling arguments would be to suggest a certification that tests information for which there are already one or more courses.  Looking at the current offerings of courses 12 c, the following two seem to come more close to what you ask for:

    Database Oracle 12 c: implement partitioning Ed 1

    Parallel processing in Oracle Database 12 c Ed 1

    These areas are covered somewhat in 1Z0 - 117.  You will need to make a case for a certification that hit different areas of knowledge.  Looking at the course for both subjects, partitioning has more that are not covered in-depth on 117.  However, it is supposed to be a 12 c Data Warehousing expertise certification coming out this year that may require a partitioning good knowledge.

  • How to change the color of each page number in InDesign CC?

    I'm working on a book that has pages with black background and some with white background... I need to know how to change the color of each page number, so that they will be visible on the black background.

    I tried clicking on the page number, cmd + shift click... nothing seems to work. I have all the page numbers on a separate layer, because they were hidden behind the images that I place on each page... I don't know if it's important.

    Any suggestion would be appreciated.

    My best advice is to make a second set of master pages with white numbers and apply them as needed.

  • How to control the number of fields in the Advanced mode in < af:query >

    Hello

    How to control the number of fields in the Advanced mode in < af:query >?

    Say I have 20 fields in my table, and I created a view of criteria with 2 fields. This would work perfectly in basic mode. But in Advanced mode , the choice of fields is possible by clicking on the Add fields button. I didn't have the customer to search with all 20 fields. Only 10 fields must be listed in the Advanced Mode, even if there are 20 fields in my table.

    How can I control the list of fields in ADDFields button?

    Any ideas?



    KR

    You can uncheck the contestable ownership of attributes that you must not appear in the Advanced Mode (but they will not appear in the other modes too!) or by programming the value the same as those mentioned here.

    http://adfcodebits.blogspot.com/2010/11/bit-27-setting-view-object-attributes.html

    Also, you can hide the button AddFields as suggested here - http://www.notjustjava.com/2011/12/cool-tips-to-showhide-components-of-the-query-control-of-adf/

  • How to adjust the number of rings on 6s before answering iPhone begins

    How to adjust the number of rings on iPhone 6s before the beginning of voicemail?

    Contact your operator. That is controlled by them. It is not based on the number of rings, it is based on time.

  • How to set the number of e-mail messages that are stored on my iPhone

    How to set the number of e-mail messages that are stored on my iPhone – so when I don't have a network connection I can see a 'large' number of messages in my Inbox etc.

    This is series is not defined in the world

    You must go to settings-> mail, contacts, and calendars and check the settings of your e-mail provider offers in this area

Maybe you are looking for