Validation of the necessary form, scroll to the first error field

Hello team Adobe Muse,

I designed a form and it worked fine now, I need to show the user where he missed the field by scrolling to the field that he kept it empty or incorrect.

I hope that can be done by the muse herself or if you can advise me with additional code I can put in the page if this can work.

Thank you in advance and I hope that I was clear in my question

Khalil

Not that I know. The standard forms widget can't stand all this. There may be something more advanced there, but generally, the validation is delicate and may require a lot of manual JavaScript hacking.

Mylenium

Tags: Adobe Muse

Similar Questions

  • Fill with initial of the first name field?

    https://DL.dropbox.com/u/78503370/AFBS_IntakeAssesment_052912_STESTV3.PDF

    Hello! I'm only a graphics person, and I am just with simple scripts. I'm trying to shoot only the first initial of the PatientName_First field and have it fill in the PatientName_Initial field in the master page so that the initials of the patient will be displayed on each page of the form.

    Please do not die of laughing at my attempt to Frankenstein a script from another form in this one, I really know anything yet, but I'm learning. I was not yet able to make JavaScript work - had more success with FormCalc.

    I don't know if that's a problem, but the form must remain static. iPad can not yet read dynamic forms, and I must be compatible iPad.

    Thanks much for any help!

    Here you go:

    1. remove all the code in the event of 'change' for the PatientName_First field.  This event fires on each typed character, and in this case, you don't need to trap all the characters.

    2. Add the following code to the event "exit" to PatientName_First:

    If (this.rawValue! == null)

    this.rawValue = this.rawValue.replace(/^\s+|\s+$/g,""); "

    The foregoing will be trim spaces attack/flight of the first name field, which was what you expected and are a good idea.  Place in means of output event happen only once the user has finished typing the name and tabs out of the field.

    3. change the name of the subform that retains information name of 'PatientDemographics '.  Naming of the subforms in the hierarchy is recommended because it makes their SEO in the script easier.  See the screenshot below.

    4. Add the following code to the event of 'calculate' to the PatientName_Initial field in the master page:

    initial var = form1. PatientDemographics.PatientName_First.rawValue;

    If (initial! == null) {}

    If (initial.length > 0) {}

    this.rawValue = initial.substr (0, 1);

    }

    }

    When the name is in the main form, the calculate event fires and the script will be executed. The script will be the first name that was entered and set the initial field to the first character in the name.  Check the name = null is important because the calculate event fires when the form is opened first, before whatever it is entered.  We check to make sure there is at least one character in the first name field before trying out the first character.

    There is no need to use a dynamic form to do this, so it should work on an iPad.  Unfortunately, I can't test that.

    See you soon,.

    Kevin

  • How can I trap FRM-40102: Record must be entered or deleted the first error

    Whenever I click the box tool button insert record (green more) I get FRM-40102: Record must be entered or deleted the first error. How to catch the trap this error?

    IF errnum = 40102 THEN
    Clear_All;
    create_record;
    END IF;

    I want to put the above code. What trigger, I need to add this code. I have the multi block shape.

    Hi Chris,
    You can use the ON-ERROR trigger at the level of the form like that...

    IF ERROR_CODE=40102 THEN
     -- Do something here...
    ELSE
      MESSAGE(ERROR_TEXT);
      MESSAGE(ERROR_TEXT);
      RAISE FORM_TRIGGER_FAILURE;
    END IF;
    

    -Clément

  • Move from one field to the other and to validate the response to the first text field automatically

    I have a problem I want to know if someone could help me with.

    I have a dynamic text box called help_txt and I have some initial instructions in order to achieve the first text field with relevant information.

    Selection.setFocus (prCv1_txt);
    Selection.setSelection (1, 0);

    The focus is already set at the beginning of the first text field, which has 2 characters maximum indicated. It is also a text entry field.

    The right answer for prCv1, which is the variable, is 01.

    If the user types 01, I want the following to happen:

    cursor automatically advances to the next text field, which is called groupNo1_txt and I want another message to display the correct information in the field of help_txt, such as the type in the next field.

    If the user does not type 01, I want the following to happen:

    cursor goes back to position 1 of the prCV1_txt text box and another message to display in the field help_txt, by mistake, please enter 01 in this area.

    Initially, I got the code to check if the user pressed the Tab key, but the error message for the 2nd text box automatically displays do not give the user the ability to type information in the second text field (groupNo1_txt).

    Can someone help me please!

    If you need me to attach a file, I can do.

    Thank you...

    Use a conditional in the onChanged function that tests first to see if the entry is at the correct number of characters...

    If (prCv1_txt.length > 1) {}

    If (prCv1_txt.text == "01") {}

    Disable prCv1_txt, select groupNo1_txt

    } else {}

    Msg error and/or reboot

    }

    }

  • Validation on the first two letter

    Hello

    Can someone help me how to write a PLSQL code.
    The code must check that the two first letter is a letter and then follow by a number e.g. AB123456, BC123456.
    When entering an error number and the first two should be appear.

    Kind regards
    EKAS

    Since you're on 10G, you can use regular, as expressions of knapen, and my examples have shown.

    Regarding the validation in the APEX: APEX has its own forum, but I have not worked with APEX (yet): Oracle Application Express (APEX) , then you might want to ask over there as well.

    But I would put a check on the table itself, both constraint in any case.
    And if possible (it should be), deal with this error in check constraint in the APEX.

  • Limit the number of characters in a text based on the first digit field

    Hello and thank you in advance for your help!

    I want to limit the amount of characters in the text field based on the first digit of the number (the text field is limited to a number format... no decimals, no comma).

    For example, if the number starts with a 3, I would limit the text field to allow only ten characters. I have three scenarios but if I could start with code and what is the best place to add (key combination or validation?) I can take it from there. Thanks again for your help!

    I wrote this code for you that does this. Use it as a typo of the custom field code:

    // Validate that only digits are entered
    if (event.change) {
        event.rc = /^\d+$/.test(event.change);
    }
    
    // Validate string length if it starts with 3
    if (/^3/.test(AFMergeChange(event))) {
        event.rc = AFMergeChange(event).length <= 10;
        if (!event.rc) app.alert("If the number starts with \"3\" it may not be longer than 10 digits.",1); // optional error message
    }
    

    You can duplicate the second part of it for additional terms, but keep in mind that this code won't let you even remove the first character in the field if the result is not valid.

    For example, if you enter "234567890123456" then you can't remove the "2" at the beginning because that would result in a number not valid. You can delete all the other numbers, even if and when it is 10 digits or less, then you can remove the departure "2" as well.

  • Import since the first error

    Hello, everyone!

    Just bought the new suite CC today and trying to find a bug. I wanted to take advantage of the rendering of AE farming capacity, so I wanted to try to change the sequence of creation in AE and go from there. I have two questions: never really used before AE and the following error: "CEAP Premiere Pro Import Plugin: the project file read error.» (5027: 12) "is anyone know what this is?

    AE, I see all the imported media first, but I do not see the edited timeline. Doesn't seem to be a matter of corruption, just a few question kind of import.

    Thank you!

    AE is crap to deal with MP3 or Lagarith. Convert your files.

    Mylenium

  • I use Dreamweaver CS4, but when I try to start I get an error code 150:30 and then an error Ftp after Ok is pressed on the first error.  How to solve the problem?

    How to fix error 150:30 with error FTP following the closure of the window for the first mistake?

    Mac?

    Really pay attention to the Important: Articles here:

    Error "Licensing has stopped working". Mac OS

  • Validation of the email address field does not not for &lt; cfinput &gt;

    My form has entry fields first name and last name and an e-mail address. "Validation for email form doesn't work people enter name ' 1, family name: 1 and email: 1 and the action of the form is completed without catch the error.

    The action called a < intrusion via CFMail > to send information to the Desktop Manager.

    Any thoughts?.

    People really enter '1' in the form or are the bots (or digitizers PCI) to display these values directly to your action script?  Before sending the intrusion via CFMail, perform an isValid ("email") on the server side to ensure that it is in fact a valid email address.

    Concerning the use of CFINPUT, I advise to use an alternative like jQuery Validation plugin.  You will have more control over validation and learn skills that you can apply to HTML (even static) elements.

    http://jqueryvalidation.org/

  • With the help of tools validator for the first time.

    I do not understand what I need to fix here:

    Line 138, column 37: there is no attribute "align".

    ' < table width = "585" border = "0" align = "" " center" cellpadding = "0" cellspacing = "0" >

    You use the attribute named above in your document, but the document type, you are using does not support this attribute of this element. This error is often caused by incorrect use of document type "Strict" with a document that uses frames (e.g. you must use the "Transitional" document type to get the 'target' attribute), or using extensions such as "marginheight" owners (it is usually fixed by using CSS to achieve the effect desired instead).

    This error can also occur if the item itself is not supported in the document type, you use, as an undefined element will have no attributes supported. in this case, check the error message undefined element for more information.

    How to fix: check the spelling and case of the element and attribute, (remember XHTML is all lowercase) or check that they are both allowed in the chosen document type and/or use CSS instead of this attribute. If you receive this error when you use the < embed > element to incorporate flash in a Web page media, see the FAQ on valid flash.

    Line 144, column 24: there is no attribute 'bgcolor '.

    < td > < table bgcolor = " " " #931 C 08" width = "625" border = "0" align = "center" cellpadd...

    You use the attribute named above in your document, but the document type, you are using does not support this attribute of this element. This error is often caused by incorrect use of document type "Strict" with a document that uses frames (e.g. you must use the "Transitional" document type to get the 'target' attribute), or using extensions such as "marginheight" owners (it is usually fixed by using CSS to achieve the effect desired instead).

    This error can also occur if the item itself is not supported in the document type, you use, as an undefined element will have no attributes supported. in this case, check the error message undefined element for more information.

    How to fix: check the spelling and case of the element and attribute, (remember XHTML is all lowercase) or check that they are both allowed in the chosen document type and/or use CSS instead of this attribute. If you receive this error when you use the < embed > element to incorporate flash in a Web page media, see the FAQ on valid flash.

    If not for the use of electronic mail and then forget validation. Html email is strongly dependent on the old deprecated html attributes. What you used

    Align = 'center' and bgcolor = # "# 931 08" are perfect for html emails

    Use the Doctype "transitional" / "coward."

    http://www.w3.org/TR/html4/loose.DTD">

    or you can just go with the html5 Doctype:

  • Can someone help me with a Code that allows you to hide all but the first few fields when the form opens

    My form has a section (subform) on top that is always open and then underneath it is dynamic and I want some subforms and sections to open based on users to input. I use action Builder to open the screen and have all the fields that are hidden, but I have too much subforms and must hide individually all subforms. Is there a code that allows you to hide all fields for me when the form opens, and then I can use action Builder to open just what I need based on a drop-down list button or radio?

    Thank you!

    Hello

    Using LockAllFields of Paul's example, you could place the JavaScript code within the root node docReady event (normally 'form1').

    Please note that the last line is the presence of one of the subforms to visible return. Let's call it ShowThisSubform.

    // Declare some variables
    var allChildElements;
    var intNumElements;
    var currentElement;
    var j;
    
    // Get all the child nodes of the parent element (the root node/"form1")
    allChildElements = this.nodes; // "this" will use the element where the script is placed
    
    //Total number of element in the object
    intNumElements = allChildElements.length;
    
    // Loop through all the child elements
    for (j=0; j< intNumElements; j++) {
         currentElement = allChildElements.item(j);
         // If the element is a subform we'll hide it
         if (allChildElements.item(j).className == "subform") {
              allChildElements.item(j).presence = "hidden";
         }
    }
    
    // Show one of the subforms
    ShowThisSubform.presence = "visible";
    

    Niall

  • The new XP installation error. The signature for the family Windows XP Setup is not valid. The error code is fffffc0d

    I'm doing a fresh install of Windows XP Edition family on a new hard drive.  I get the same error message indicating that the product catalog can not be installed. I reformatted and retryed with the same result. I tried a different HARD disk, but got the same trouble. I also tried installing XP Pro after a reformat and got the same error. The first error window says "the signature for the family Windows XP Setup is not valid. The error code is fffffc0d", and the second says" error: the system cannot find message for message number 0xfffffc0d text in the file for syssetup.dll fatal error messages: Setup failed to install the product catalogs. " Any directive or ideas would be greatly appreciated. THX

    Hello

    I suggest you try the steps from the link below and check if it helps.

    http://support.Microsoft.com/kb/307153

    Hope this information is useful.

  • The current XML is not valid on the use of the narrative mode external graphics

    Hello

    I always get the following message when embedding amcharts or google maps using narrative view. Once registered, it is not possible in addition to change the narrative view. However, the report works very well, the graphic is displayed, but not editable.

    see you soon,
    Mark



    Error display of the results

    The current XML is not valid with the following errors: Bad xml instance! <? XML version = "1.0"? "" > < xmlns:saw="com.siebel.analytics.web/report/v1.1 saw: report" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" xmlns:sawx="com.siebel.analytics.web/expression/v1.1" xmlVersion = "200810080" > < saw: criteria xsi: type = "saw: simpleCriteria ' subjectArea ="& quot; QC4Agility & quot; "withinHierarchy ="true"> < saw: columns > < saw: column xsi: type = columnID ' saw: regularColumn" = "c5f655b89c322bce7" > < saw: columnFormula > < sawx:expr xsi: type = "sawx:sqlExpression" > & quot; Sun - RUN & quot;. & quot; RUN the status & quot; < / sawx:expr > < / saw: columnFormula > < / saw: column > < saw: column xsi: type = columnID ' saw: regularColumn "="c9de76acdb49ee65f"> < saw: columnFormula > < sawx:expr xsi: type ="sawx:sqlExpression"> & quot; Fact - req_test_run & quot;. & quot; # REQs & quot; < / sawx:expr > < / saw: columnFormula > < / saw: column > < saw: column xsi: type = columnID ' saw: regularColumn "="c9fe9f1713d290812"> < saw: columnFormula > < sawx:expr xsi: type ="sawx:sqlExpression"> & quot; Fact - req_test_run & quot;. & quot; # TESTs & quot; < / sawx:expr > < / saw: columnFormula > < / saw: column > < / saw: columns > < saw: filter > < sawx:expr xsi: type = "" sawx: logic "op = 'and' > < sawx:expr xsi: type ="sawx:comparison"op ="equal"> < sawx:expr xsi: type ="sawx:sqlExpression"> & quot;" Sun - REQ & quot;. & quot; The target version of REQ & quot; < / sawx:expr > < sawx:expr xsi: type = "xsd: String" > 1.0 < / sawx:expr > < / sawx:expr > < sawx:expr xsi: type = "sawx:comparison" op = "lessOrEqual" > < sawx:expr xsi: type = "sawx:sqlExpression" > & quot; Sun - REQ & quot;. & quot; REQ nCycle & quot; < / sawx:expr > < sawx:expr xsi: type = "sawx:variable" op = "server" > CurrentCycle < / sawx:expr > < / sawx:expr > < sawx:expr xsi: type = "sawx:comparison" op = "not null" > < sawx:expr xsi: type = "sawx:sqlExpression" > & quot; Sun - RUN & quot;. & quot; RUN status & quot; < / sawx:expr > < / sawx:expr > < / sawx:expr > < / saw: filter > < / saw: criteria > < currentView saw: views = '0' > < saw: view xsi: type = "saw: compoundView" name = "compoundView! 1 "> < saw: cvTable > < saw: cvRow > < viewName saw: cvCell ="titleView! 1 "> < saw: displayFormat > < seen: formatSpec / > < / saw: displayFormat > < / saw: cvCell > < / saw: cvRow > < saw: cvRow > < viewName saw: cvCell ="tableView! 1 ' > < saw: displayFormat > < saw: formatSpec / > < / saw: displayFormat > < / saw: cvCell > < / saw: cvRow > < saw: cvRow > < viewName saw: cvCell = "dvtchart!"» 1 "/ > < / saw: cvRow > < seen: cvRow > < viewName saw: cvCell ="narrativeView! " 1 "/ > < / saw: cvRow > < / saw: cvTable > < / saw: view > < saw: view xsi: type =" saw: titleView "name ="titleView! 1 "/ > < saw: view xsi: type =" saw: tableView "name ="tableView! 1 "> < saw: edges > < saw axis: edge = 'page' showColumnHeader = 'true' / > < saw axis: edge ="section"/ > < seen: edge axis ="row"showColumnHeader ="true"> < saw: edgeLayers > < saw: edgeLayer type ="column' columnID = "c5f655b89c322bce7" / > < type of saw: edgeLayer = "column' columnID ="c9de76acdb49ee65f"/ > < type of saw: edgeLayer ="column' columnID = "c9fe9f1713d290812" / > < / saw : edgeLayers > < / saw: edge > < saw axis: edge = "column" / > < / saw: edges > < / saw: view > < saw: view xsi: type = "view: dvtchart" name = "dvtchart".! 1 "> < saw: display type = subtype 'pie' = 'default' renderFormat ="flash"mode ="on line"xAxisLiveScrolling ="false"yAxisLiveScrolling ="false"clientEventEnabled ="false"animateOnDisplay ="true"> < saw: style barStyle = 'default' lineStyle = 'default' scatterStyle = 'default' fillStyle = 'default' bubblePercentSize = '100' effect ="2d"/ > < / saw: display > < saw: canvasFormat height ="330"width ="640"showGradient ="true"> < saw: dataLabels display ="always"label ="nameValue"position ="under"transparentBackground = 'true' valueAs = abbreviation of 'default' ="default"> < vu : textFormat fontSize = "14" / > < saw: dataFormat xsi: type commas = "saw: number" = 'false' negativeType = 'less' minDigits = '0' maxDigits = '0' / > < / saw: dataLabels > < saw: default gridlines = "true" > < saw: horizontal > < saw: visible major = "false" / > < saw: visible minor = 'false' / > < / saw: horizontal > < saw: vertical > < saw: visible major = "false" / > < seen : visible minor = "false" / > < / saw: Portrait > < / saw: grid > < miter saw mode: title = 'auto' > < saw: legend / > < / saw: title > < / saw: canvasFormat > < saw: selections > < saw: Categories > < saw: category > < columnID saw: columnRef = "c5f655b89c322bce7" / > < / saw: category > < / saw: Categories > < saw: measures showMeasureLabelsOnCategory = 'false' > < seen : column measureType = 'pie' > < columnID saw: columnRef = "c9de76acdb49ee65f" / > < / saw: column > < / saw: measures > < saw: seriesGenerators > < saw: seriesGenerator / > < saw: measureLabels / > < / saw: seriesGenerators > < / saw: selections > < position saw: legendFormat = "none" transparentFill = "true" > < saw: textFormat / > < / saw: legendFormat > < saw: seriesFormats > < name of saw : seriesFormatGroup = 'pie' > < seen: seriesFormatRule > < saw: seriesCondition columnID = position 'c5f655b89c322bce7' = '0' > < saw: condition > < sawx:expr xsi: type = "sawx:comparison" op = "equal" > < columnID saw: columnRef = "c5f655b89c322bce7" / > < sawx:expr xsi: type = "xsd: String" > Failed < / sawx:expr > < / sawx:expr > < / saw: condition > < / saw: seriesCondition > < saw : visualFormats > < seen: visualFormat color = "#FF0000" / > < / saw: visualFormats > < / saw: seriesFormatRule > < saw: seriesFormatRule > < columnID saw: seriesCondition = position "c5f655b89c322bce7" = "1" > < saw: condition > < sawx:expr xsi: type = "sawx:comparison" op = "equal" > < columnID saw: columnRef = "c5f655b89c322bce7" / > < sawx:expr xsi: type = "xsd: String" > Passed < / sawx:expr > < / sawx : expr > < / saw: condition > < / saw: seriesCondition > < saw: visualFormats > < saw: visualFormat color = "#B0C060" / > < / saw: visualFormats > < / saw: seriesFormatRule > < / saw: seriesFormatGroup > < / saw: seriesFormats > < / saw: view > < saw: view xsi: type = "saw: narrativeView" name = "narrativeView ! 1 "> < saw: prefix > < saw: legend fmt ="html"> < saw: text / > < / saw: legend > < / saw: prefix > < / saw: view > < / saw: views > < parsererror xmlns ="http://www.w3.org/1999/xhtml"style =" display: block; " white-space: pre; border: 2px solid #c77; padding: 0 1em 1em 0; margin: 1em; background-color: #fdd; color: black "> < h3 > This page contains the following errors: < / h3 > < div style =" do-family: monospace; font-size: 12px "[> error on line 6 in column 430: sequence & #39;]]" & gt; & #39; not allowed in content < / div > < h3 > here is a rendering of the page up to the first error. < / h3 > < / parsererror > < / saw: report > Line: 2, Col: 5482, unknown element "parsererror" Line: 2, Col: 5482, 'style' attribute is not declared for element "parsererror" Line: 3, Col: 98, item "parsererror" is not valid for the content model: ' ((critères, vues, invites, listOptions), segmentOptions)'
    Error details
    Error codes: EIRWWH9E
    Geographical area: saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool, saw.threadpool, saw.threads


    narrative view used for the test:

    Prefix
    < script type = "text/javascript" src = "http://extra.amcharts.com/public/swfobject.js" > < / script >
    < div id = "amcharts_1308229514469" > you need to update your Flash Player < / div >
    < script type = "text/javascript" >
    var so = new SWFObject ("http://extra.amcharts.com/public/ampie.swf", "Oh", "500", "400", "8", "#FFFFFF");
    so.addVariable ("path", "Oh /");
    so.addVariable ("chart_settings", encodeURIComponent ("< parameters > < precision > 0 < /precision > < background > < alpha > 100 < /alpha > < border_alpha > 20 < / border_alpha > < / background > < legend > < align > Center < /aligner > < / legend > < pie > < y > 50% / < y > < start_angle > 0 < / start_angle > < outline_color > FF0000 < / outline_color > < / pie >")) < data_labels > < see the > <! [CDATA [< b > {title}, {percentages} % < /b > ({value})]] > < / show > < max_width > 150 < / max_width > < / data_labels > < label > < lid label = '0' > < text > DIR < / text > < x > 10 / < x > < > 000000 appears < / appears > < text_size > 28 < / text_size > < align > Center < / align > < / label > < lid label =' 1' > < text > S & amp; ((' E < / text > < y > 220 / < y > < appears > FFFFFF < / appears > < text_size > 28 < / text_size > < align > Center < / align > < / label > < / labels > < / settings > '));
    so.addVariable ("chart_data", encodeURIComponent ("< pie >

    * Story *.
    < slice title = 'United States' > 19544 < / slice >

    * Postfix *.
    (("< pie / > '));
    so. Write ("amcharts_1308229514469");
    < /script >

    I think it's a problem with your CDATA section. Remove this small and test again to prove that he is the cause.

    Paul

  • SELECT - get the first of many

    Hi all

    I was wondering if someone can help me with the following query. I'll post some sample data and explain what I would like. I also have a query that works, but I was wondering if there is another way to do what I want.
    DROP TABLE DOSSIERS;
    CREATE TABLE DOSSIERS 
    (
      dossier_id NUMBER(10) PRIMARY KEY, 
      dossier_name VARCHAR2(100)
    );
    
    DROP TABLE ACTORS ;
    CREATE TABLE ACTORS 
    (
      actor_id NUMBER(10) PRIMARY KEY, 
      actor_name VARCHAR2(100)
    );
    
    DROP TABLE PARTICIPATIONS;
    CREATE TABLE PARTICIPATIONS
    (
      participation_id NUMBER(10)  PRIMARY KEY, -- pk (technical field)
      dossier_id NUMBER(10), -- fk to dossiers
      actor_id NUMBER(10), -- fk to actors
      actor_type VARCHAR2(10), 
      ranking NUMBER(10)
    );
    
    INSERT INTO DOSSIERS VALUES(1, 'Dossier 1');
    INSERT INTO DOSSIERS VALUES(2, 'Dossier 2');
    INSERT INTO DOSSIERS VALUES(3, 'Dossier 3');
    
    INSERT INTO ACTORS VALUES (1000, 'James');
    INSERT INTO ACTORS VALUES (1003, 'Ghandi');
    INSERT INTO ACTORS VALUES (1009, 'Simon');
    INSERT INTO ACTORS VALUES (1010, 'John');
    INSERT INTO ACTORS VALUES (1019, 'Georges');
    INSERT INTO ACTORS VALUES (1032, 'Michelle');
    INSERT INTO ACTORS VALUES (1033, 'Laura');
    
    
    INSERT INTO PARTICIPATIONS VALUES(1, 1, 1000, 'WRITER', 12);
    INSERT INTO PARTICIPATIONS VALUES(2, 1, 1003, 'REVIEWER', 13);
    INSERT INTO PARTICIPATIONS VALUES(3, 1, 1010, 'REVIEWER', 14);
    INSERT INTO PARTICIPATIONS VALUES(4, 1, 1009, 'VALIDATOR', 9);
    INSERT INTO PARTICIPATIONS VALUES(5, 1, 1033, 'VALIDATOR', 122);
    INSERT INTO PARTICIPATIONS VALUES(6, 1, 1032, 'VALIDATOR', 121);
    INSERT INTO PARTICIPATIONS VALUES(7, 1, 1019, 'VALIDATOR', 123);
    
    
    INSERT INTO PARTICIPATIONS VALUES(10, 2, 1032, 'WRITER', 1);
    INSERT INTO PARTICIPATIONS VALUES(11, 2, 1003, 'REVIEWER', 2);
    
    INSERT INTO PARTICIPATIONS VALUES(30, 3, 1019, 'WRITER', 1);
    INSERT INTO PARTICIPATIONS VALUES(31, 3, 1000, 'VALIDATOR', 2);
    INSERT INTO PARTICIPATIONS VALUES(32, 3, 1032, 'WRITER', 10);
    INSERT INTO PARTICIPATIONS VALUES(33, 3, 1009, 'WRITER', 20);
    INSERT INTO PARTICIPATIONS VALUES(34, 3, 1003, 'WRITER', 21);
    COMMIT;
    
    SELECT d.dossier_id, 
           (SELECT actor_name 
              FROM actors a 
             WHERE a.actor_id = (SELECT pi.actor_id
                                   FROM participations pi
                                  WHERE pi.dossier_id = d.dossier_id 
                                    AND pi.actor_type = 'WRITER'
                                    AND pi.ranking = (SELECT MIN(pa.ranking)
                                                        FROM participations pa
                                                       WHERE pa.dossier_id = d.dossier_id
                                                         AND pa.actor_type = 'WRITER'
                                                      )
                               )
           ) as FIRST_WRITER, 
           (SELECT actor_name 
              FROM actors a 
             WHERE a.actor_id = (SELECT pi.actor_id
                                   FROM participations pi
                                  WHERE pi.dossier_id = d.dossier_id 
                                    AND pi.actor_type = 'REVIEWER'
                                    AND pi.ranking = (SELECT MIN(pa.ranking)
                                                        FROM participations pa
                                                       WHERE pa.dossier_id = d.dossier_id
                                                         AND pa.actor_type = 'REVIEWER'
                                                      )
                               )
           ) as FIRST_REVIEWER, 
           (SELECT actor_name 
              FROM actors a 
             WHERE a.actor_id = (SELECT pi.actor_id
                                   FROM participations pi
                                  WHERE pi.dossier_id = d.dossier_id 
                                    AND pi.actor_type = 'VALIDATOR'
                                    AND pi.ranking = (SELECT MIN(pa.ranking)
                                                        FROM participations pa
                                                       WHERE pa.dossier_id = d.dossier_id
                                                         AND pa.actor_type = 'VALIDATOR'
                                                      )
                               )
           ) as FIRST_VALIDATOR
      FROM dossiers d
    ;
    The SELECTION that I posted returns for each folder, the WRITER, the VALIDATOR and the first REVIEWER to a folder. I was wondering if it was possible to do without the need to have so many subqueries?

    Also, I was wondering if it was possible to do without having to hardcode the different types of actors. And if tomorrow I add someone new, like the AUTHOR, I also have the first author in the result (a new column)?

    I'm still using Oracle 10 g (10.2)

    Thanks for your help,

    Hello

    user13117585 wrote:
    ...

    min(case actor_type when 'WRITER' then actor_name end)
    keep(dense_rank first order by case actor_type when 'WRITER' then ranking end nulls last) first_writer,
    

    This property returns the first writer. OK, cool. I guess you used the MIN because the expression is not in the GROUP BY.

    In fact, it is because the ORDER BY expression cannot be unique. First of ALL is an aggregate function; It is guaranteed to return a string exactly by the group, first anemly, wher 'first' is defined by the ORDER BY clause in the service. Even if you know that the expression will be unique, you must always indicate the FIRST what to do in case of a tie. Means that MIN, if it happens to be a tie, take the first string (in the normal sort order).

    What I don't really understand is IN the order OF. I know not which is the CASE, but I do not understand its purpose in this query.

    Do you understand what that means?

    keep(dense_rank first order by                                    ranking     nulls last) 
    

    It is said 'take the first in the group, according to the ranking and set NULL values at the end of the list.
    When is 'the group' in this case? It's all lines with the same dossier_id, withour held in what actor_type it is associated. This isn't what we want. If this expression is supposed to find the first writer, then we want to make sure that the collation for a non-0writer will never come first.

    keep(dense_rank first order by case actor_type when 'WRITER' then ranking end nulls last) 
    

    impeccable; It maps all the rankings for editors not null, then they will come at the end of the list.

  • First text field in the page submit when the Enter key is hit. Don't want to send

    Hello

    I searched and cannot find this answer I had before...

    The text field is not present it always when you press included, just a standard text element.

    because it is the first text field in the page... or maybe it was because it is the text field on the page that requires him to 'Submit' page when you press the Enter"" key.

    I don't want the Enter key to send the page.
    Was - to add a dummy hidden text field before this text field?

    Bill:

    Add another text element to your page and to the text element 'attributes of HTML Form elements' specify

    style = "" display: none ""

    CITY

Maybe you are looking for