Generate Max number +1 in Tablour Style

Hi
I am using tablour style form i want to create a max(no)+1 in each row
i write this trigger
but its show max(no)+1 in first row and same number coming in all other row
for example
My Max(no) is 15
So in
First row its show 16
2nd row 16
3rd row 16
Sequence number generate in each row
Hope you guys understand
My form version is 6I and database 10g
Regards
Shahzaib ismail

max + 1 will not work until u use POST........but POST will generate REDO.
Another option is to get_block_property(:system.cursor_block,record_no) as Serial No
one more choice is to create a summary column called Count_records in ur block which counts any field of ur block and on WHEN-CREATE-RECORD or any other trigger u can write this code
if :my_block.myid is null then
   :my_block.myid  := nvl(:count_ids,0) + 1;
end if;Baig
[My Oracle Blog|http://baigsorcl.blogspot.com/]
Edited by: Baig on Feb 9, 2010 11:01 AM

Similar Messages

  • Max number of pages in a spool

    Hi Gurus,
    I have a background job which takes an input file from app server.Input file has 50000 records.I need to process them inside the program and display the result in spool.Now,my question is ,will I be able to see all the records.is there any upper limit for no.of pages that gets generated in the spool.

    Usally no limit for max number of pages ( There may be a system setting for it). But when you scroll down, it does not display all the data. You can either click on the button Settings and choose last 10 pages or click on last page button and that will display till the end.

  • Max number of items exceeded?

    I am trying to develop a questionaire like application. Most of the logic is stored inside pl/sql functions (that is retrieving the previous or next question with possible answers and answer-types, like, eg. radiogroup, select-list, textarea, ...) while all of the questions and respective possible answers are kept inside a collection. In processing the answers after submit I store given answers inside the same collection, basically by nullifying all possibly previously given answers for the current question and then looping through eg, g_f01.count to refill. The entire application remains on the same page, showing eg., in one 'frame', one or two questions with say 7 checkboxes and two textareas.
    Everything seems to work fine, I can go forward and backward and will find new questions or ones that already have been answerd, but!!...
    after the 50st item (answer), that is after I reached the 50st radiogroup, checkbox or textarea, new checkboxes or radiogroups even though shown the resulting values will not be stored inside the collection anymore.
    generating the page i use:
    htp.prn(apex_item.radiogroup(p_idx => 1, p_value => c2.a_id, p_selected_value => c2.qa_id, p_attributes => 'id="P2_QUEST_' || i || '"'));
    and in processing correspondingly ...
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    FOR c2 IN
    (SELECT seq_id,
    c001 q_id,
    c002 a_id,
    c012 qa_id
    FROM apex_collections
    WHERE c001 = to_char(p_q_id)
    AND collection_name = 'ANSWERS'
    AND c002 = apex_application.g_f01(i))
    LOOP
    apex_collection.update_member_attribute(p_collection_name =>
    'ANSWERS', p_seq => c2.seq_id, p_attr_number => '12',
    p_attr_value => c2.a_id);
    END LOOP;
    END LOOP;
    to me I only use f01 ... f04 say, ... Is it possible that I still hit the max of 50 page-items?
    Regards
    j.

    max number of items exceeded?

  • Need help with a JavaScript to generate random number

    Hi
    First things first. I don't know the J of JavaScript.
    When I was thinking of some readymade solution to generate a random number in Captivate, I found this on a LinkedIn forum.
    1) Add a user variable to your project called "randomNumber". It's value can be zero.
    2) Add a Text Caption with "$$randomNumber$$" in it, to check whether your script is working.
    3) Add a button to the slide. Give it an On Success Action of Execute JavaScript. Turn off it's "Continue Playing the Project" checkbox.
    4) Add the following text in the button's Script_Window:
    var objCP = document.Captivate;
    var rand = 1 + Math.floor(Math.random() * 10);
    function onButtonClick(){
    objCP.cpEISetValue('randomNumber', rand);
    onButtonClick();
    However, this is (as the poster in the forum warned) not working for Captivate 7. Can somebody please help?
    I am open for any other methods of getting the same result.
    Thanks in advance,
    Sreekanth

    Hi Sreekanth,
    When testing, make sure you are testing from a web server where the web address begins with http or https.  When setting the captivate variable "randomNumber" try this instead:
    objCP.cpEISetValue('m_VarHandle.randomNumber', rand);
    That will only work for SWF output.  If you want it to work for both HTML5 and SWF output, try this code:
    window.onButtonClick = function(){
              var rand = generateRandomNumber(1, 10);
              setCpVariable('randomNumber', rand);
    window.generateRandomNumber = function(min, max){
              var randomNum = 0;
              if(!isNaN(parseFloat(min)) && !isNaN(parseFloat(max))){
                        min = Number(min);
                        max = Number(max);
                  randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
              return randomNum;
    window.setCpVariable = function (cpUserVariableName, variableValue) {
              /* Check for HTML5 vs. SWF output */
              if (typeof window.cp === 'undefined') {
                        /* We have SWF output, so Get the Captivate Object */
                        var objCp = document.getElementById('Captivate');
                        if (objCp && objCp.cpEISetValue) {
                                  /* Set the Captivate User variable with the JavaScript variable, variableValue */
                                  objCp.cpEISetValue('m_VarHandle.' + cpUserVariableName, variableValue);
              } else {
                        /* We have HTML5 output */
                        /*If variable does not exist off of the window object, then use the variables manager*/
                        if (typeof window[cpUserVariableName] === 'undefined') {
                                  if (cp.vm && cp.vm.setVariableValue) {
                                            cp.vm.setVariableValue(cpUserVariableName, variableValue);
                        } else {
                                  window[cpUserVariableName] = variableValue;
    window.onButtonClick();
    Be sure to test this from a web server or else local security will prevent the javascript from executing.
    Best,
    Jim Leichliter

  • Max Number of Procurement Proposal for a date

    We have scenario where a user has changed fixed lot size for a material 11,70,000 to 1 Pc. As result more than 2 Million Purchase requisitions got created by MRP. Is there any standard config settings, where we can maintain max number of procurement proposal for given date or demand. So that we can prevent such occurances in future.

    Hello Amit.
    The materials planning creates a large number of order proposals in the amount of the fixed lot size for this one request for a fixed lot size (lot-sizing procedure 'FX') with a large number of requests and a small number of fixed lot sizes.
    In Customizing for the plant parameters of materials planning (transaction OPPQ, table T399D) you can set a parameter for the maximum number of order proposals that are created by materials planning for a requirements date.
    The materials planning of this material terminates regularly if the maximum number is exceeded. An error document with error message E098 is generated. This way you can prevent that the MRP run terminates if the lot-sizing procedure is set unfavorably.
    Best Regards,
    R.Brahmankar

  • Max number of account

    Hi,
    I'm working with Oracle BI Administration Tool 11.1.1.6.1, where I have imported metadata of an Essbase cube with more than 8.000 account (measures).
    Is there a max number of account I can load from an Essbase cube?
    Is there a way to count the account in the Physical Layer (after I have imported metadata) smarter than counting manually?
    Thank for your help,
    MAB (Italy)

    Hi,
    I do not think there is any restriction on the number of measures and YES, counting them manually is a huge task.How about generating a .xml of that .rpd and counting the number of physical object tags in that .xml using some editor like notepad++ ;) .
    Hope this helps
    Thank you,
    Dhar

  • Auto generate Invoice Number

    Dear All,
    I want to auto generate inovice number. I did not want to handle this from sequences because I still did not understand/handle this, so kindly suggest an other best way to generate invoce number automatically through programitcally. I have three tables, one master table and two detail tables.
    Thanks and regards,
    Hassan

    christian erlinger wrote:
    what's the trouble with using sequences?!?
    http://docs.oracle.com/cd/B28359_01/server.111/b28318/schema.htm#CNCPT611
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/views002.htm#ADMIN11796
    the max+1 approach is a dangerous one, and will lead to unexplainable random occuring ora-0001...
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:3379873654938
    cheersOf course nothing is wront with sequences, but he/she is generating invoice-numbers, means there should be no gaps between the numbers -> sequences not usable for this problem
    you definetely need a different approach, but have to take care! what happens if two people at the same time press commit in forms? both select e.g. 42 for the invoice-number, it will (hopefully you made unique contraints) crash with a UK-violation, so just put a select max+1 in pre-commit is not good enough.
    I think best way to realize it is to make a table with one record that contains the last invoice-number, before every commit you select the record for update, if its already locked, wait or retry later the commit and increment in the invoice-number table is done when commiting the invoice itself.
    Any flaws in this thought? Other suggestions?

  • Generating random number within size of map problem (why me!!) ?

    Hi Guys,
    I'm trying to generator random numbers between 0 and a map width and another random number between 0 and a map height i.e if the map width was 3 i can generator 0,1,2.
    The coding i am using to do this is :
    int randomCol;
    int randomRow;
    randomCol = newMapWidth - 0 + 1;
    int itemp = generator.nextInt() % randomCol;
    if (itemp < 0)
          itemp = -itemp;
    randomCol = 0 + itemp;
    randomRow = newMapHeight - 0 + 1;
    int jtemp = generator.nextInt() % randomRow;
    if (jtemp < 0)
         jtemp = -jtemp;
    randomRow = 0 + jtemp;I've had a look at similar problems and searched penalty but can't seem to get it right for whatever way i implement. It leads to some array out of bound errors.
    If any can help me resolve this problem it would be greatly appreciated.
    Thanks A lot !

    Hippolyte wrote:
    randomRow = 0 + jtemp;I'll bite: what's the "0 + " voodoo for?It?s for clarity and Code readability, I guess. @OP: Random.nextFloat() generates numbers from 0.0f to 1.0f. Multiplying this number with your max value will generate a number between 0 and that given max value. BTW, you can generate numbers from -a to a by using (Random.nextFloat()- .5f) * (2 * a).
    Shazaam.

  • HT204053 Max number of devices on one iTunes account?

    Max number of Devices on a single iTunes account

    Devices or Computers? The former there is no limit. For the latter there is a limit of 5.

  • Error in generating reference number of process

    Hi All Masters,
    I'm new in HCM P&F.
    Currently I have a problem. I was running a sample process or copied process from the sample. Clicking 'check and send'. Still OK.
    But when I clicked 'Send' button, I got an error message displayed 'Error in generating reference number of process'
    Would you please help me what's wrong with that? FYI, I've tried to activate Case Management, but maybe, there is still any loss in that area?
    Thank you for your help
    Regards,
    Pradita Herdiansyah

    Hi Otto,
    Neither did I. I don't have any complete resources. Maybe actually there are exists somewhere, but just I don't find it yet.
    I try to learn and doing that by watching this forum and sap help/doc, just maybe there are other people who have same obstacles with me in developing this and then I will get solutions for it.
    Have a nice day...
    Regards,
    Pradita Herdiansyah

  • Is there a max number of names that can be put into Contacts

    is there a max number of names that can be put into Contacts and still have the app work well?

    Yes, there is. It's how many contacts your hard drive can take. So you can fill up the entire computer with nothing but contacts until your HDD/Flash has no space left. So if you have 250GB, it'd be less than if you had 500GB and you'd have more on 750GB.

  • Max number of chars in process message MSEL?

    Hi, what is the max number of characteristics can be used in process message category's MSEL table? Right now, I am using more than 99 characteristics and I get a short dump DYNPRO_FIELD_CONVERSION. Is it really limited to 99 characteristics and if it is true, is there an OSS note to change it to allow more than 99?
    Thanks and points available

    Please make sure that you build a
    multithreaded program first (check with ldd).
    If anyone can tell me the maximum number of threads per process I would
    really appreicate it.
    Also the maximum number of open files per process. It depends on the architecture (x86/SPARC), OS version,
    64 or 32-bit, /etc/system, shell limitations (/usr/bin/ulimit) ...
    Search for "rlim_fd_max / rlim_fd_cur" on docs.sun.com too.
    HTH,
    -vladimir

  • What is the max number of hyperlinks supported in a PDF docment?

    What is the max number of hyperlinks supported in a PDF docment?
    How do I find out how many hyperlinks there are in a PDF document?

    I don't think there's a limit to the number of links you can add to a file...
    This code (taken from the reference files) will report the number of links in your file:
    var numLinks=0;
    for ( var p = 0; p < this.numPages; p++)
    var b = this.getPageBox("Crop", p);
    var l = this.getLinks(p, b);
    console.println("Number of Links on page " + p +" is " + l.length);
    numLinks += l.length;
    console.println("Number of Links in Document is " + numLinks);

  • Max number of Hits Account Identification

    Hi all,
    we are currently having the problem in IC that when somebody try to identify an account of an BP with more that 100 related sold to parties, that no account is displayed because of the standard max number of hits 100.
    I have found the path to customize this in the SPRO but this sentence in the SAP help is making me some headache:
    The higher the number you enter here, the more results the system will search for, and in turn, the more performance is affected. The maximum number of hits that the system allows is 100, which is also the default value.
    I understand the point of the performance, but does this mean that the performance is also affected the account identification of the other BP with less than 100 related sold to parties?
    Can anybody help in this issue?
    We are working on CRM 5.0.
    Regards
    Abosi
    Edited by: Abosi_3li2 on Feb 8, 2012 11:08 AM

    Hello
    The bug of nothing displayed if over 100 accounts are found is solved with [SAP note 1467929|https://service.sap.com/sap/support/notes/1467929.]
    The code you are referring to is:
    IF bpident_profile-max_hits IS INITIAL.
    max_hits = 100.
    ELSE.
    max_hits = bpident_profile-max_hits.
    ENDIF.
    It means that, if blank, 100 hits is considered. You can modify the customizing up to 255 results since that is the limit of accounts to be found.
    Regards
    Joaquin

  • "max number of thread"

    We are running a java web app on a Ubuntu Oracle WebLogic server version 10.3.3.
    The java web app performs long polls with open tcp socket to keep the client connection open. The clients are long polling the WebLogic at 30 seconds.
    Currently we are not able to maintain stability for greater than 24 hours with approximately 200 simultaneous sessions on WebLogic server. Session to me is active client/server tcp connection. We have re-written our application to use continuations, but we are seeing ConcurrentModificationException errors in performance testing.
    Is there any setting in WebLogic for “max number of thread” that can handle?
    Edited by: user9316392 on Jul 8, 2010 11:07 AM

    First, WebLogic since 9.0 has a self-tuning thread pool where WLS will automatically grow and shrink the number of threads based on some internal algorithms. I'm not aware of a hard limit so theoretically there is no max thread count as long as the JVM has memory and WLS thinks more threads will help. You can read up on it here:
    http://www.oracle.com/technology/pub/articles/dev2arch/2006/01/workload-management.html
    Practically, I wouldn't expect more than several hundred threads to be helpful.
    As for your situation, how does WLS become unstable? Out of memory, out of file descriptors, errors on new requests, etc. I think you're going to have to use some JVM tools to see what happens to your JVM over time. Is there a memory leak somewhere, is it non-heap memory, etc. JRockit Mission Control is helpful if running on JRockit. If you're on Sun Hotspot, them presumably you can use some of the Hotspot tools. You'll want to compare the state of the JVM towards the beginning of your load test, but after a slight warm-up period with a snapshot after the load test has been running for a long period of time.

Maybe you are looking for