Mandatory item validation at a page level?

Hi,
We have a page where the list of mandatory items changes according to how some 'key' items are set by the user e.g. if they select option 1 on item 1 we need a different set of mandatory fields than if they set option 2 - setting option 1 in item 4, may imply that some further items are mandatory, In addition, some items become mandatory due to circumstances known only on the database. We have in excess of 40 items on this page. Once all mandatory items are complete, the status of the page is saved as 'complete' - the user can always save the page as 'incomplete'.
We already have a database package that can check a table row to see if it is 'complete', it knows all the circumstances for when an items becomes mandatory and can produce a list of fields and the reasons why they have failed validation.
Is it possible to call this db package during page validation and use it to perform 'item' validations i.e. identify the invalid items and place the appropriate message inline with them?

Hi,
You can create a pl/sql page validation where you call you procedure.
begin
package_k.proc_p(item1,item2,...,itemN);
end;
You should define the type of the validation, but it is very straight forward,
Regards,
Max.

Similar Messages

  • Do validations in the page level

    Hi ,
    I want to do validate the EMAIL field in my page as unique, for that i want to do validate in the entity level or what i want do?
    i tried validations in the entity level but it is not working, how to do this .
    Thanks In Advance,
    SAN

    Sundaravaradhan,
    One more thing please make sure that you close all your threads which are resolved with the resolution.
    fnd top and java top in R12
    Error page while running sample page in OAF
    and many more
    Thanks
    --Anil
    http://oracleanil.blogspot.com

  • Item & page level validation

    1. How do I check/see if a validation rule is page level or item level, I couldn't find any difference in the definitions between the two as seen on the definition screens in APEX.
    2. (Could be related to 1.) I expected the validation rule 'Item in Expression1 contains at least one of the characters in Expression2' to imply that Expression1 can not be NULL. I had to create a separate IS NOT NULL validation rule however. To me that does not make sense or is there a reasonable explanation?
    tia,
    Martin

    Martin,
    As Tony said, there is no difference between page and item validations other than the ability for item validations to have error messages positioned right next to their label.
    As for the null value problem, the following "item comparison" -type validations do not produce a validation error if the specified item is null:
    * Item specified contains no spaces
    * Item specified is a valid date
    * Item in Expression 1 contains only characters in Expression 2
    * Item in Expression 1 contains at least one of the characters in Expression 2
    * Item in Expression 1 does not contain any of the characters in Expression 2
    This allows you to account for the null value case with a separate "not null" validation. Without this behavior there would have to be a "Item in Expression 1 is NULL OR <remainder of validation>" -type validation in addition to each of the above validation types.
    However, the following validation types do result in a validation failure if the item is null:
    * Item in Expression 1 equals string literal in Expression 2
    * Item in Expression 1 is contained in Expression 2
    This behavior appears to be an oversight, also spelled bug.
    Scott

  • Item Level & Page Level Validation..

    Hi ,
    What is the difference between Item Level validation & Page Level validation..
    in which sceneario it will be useful.
    Anoo..
    Edited by: Anoo on Dec 16, 2008 5:04 AM

    Hi,
    From the APEX help:
    * Item level validations are specific to a single item.
    * Page level validations do not apply to any single item, but apply to an entire page.
    {code}
    Paulo Vale
    [http://apex-notes.blogspot.com]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Page level validation to prevent duplicate data entry into the database

    Hello,
    Can anyone please help me out with this issue.
    I have a form with two items based on a table. I already have an item level validation to check for null. Now I would like to create a page level validation to check that duplicate data are not entered into the database. I would like to check the database when the user clicks on ‘Create’ button to ensure they are not inserting duplicate record. If data already exist, then show the error message and redirect them to another page. I am using apex 3.2
    Thanks

    Hi,
    Have you tried writing a PLSQL function to check this?
    I haven't tested this specifically, but something like this should work:
    1) Create a Page Level Validation
    2) Choose PLSQL for the method
    3) Choose Function Returning Boolean for the Type
    For the validation code, you could do something like this:
    DECLARE
        v_cnt number;
    BEGIN
        select count(*)
        into v_cnt
        from
        your_table
        where
        col1 = :P1_field1 AND
        col2 = :P2_field2;
        if v_cnt > 0 then return false;
        else return true;
        end if;
    END;If the query returns false, then your error message will be displayed.
    Not sure how you would go about redirecting after this page though. Maybe just allow the user to try again with another value (in case they made a mistake) or just press a 'cancel' button to finish trying to create a new record.
    Amanda.

  • Aplication Vs. Page level items for application process

    Hi,
    I have many application processes in my applications, many of them take parameters.
    Right now I am passing parameters using page level temporary items. This is causing each page to have many items that are only used for calling the application process.
    Is it better to use application level items for this purpose?
    any pros and cons for each of these?
    ~Ketan

    Arie,
    Are you saying that the condition only apply to rendering the item, but the APEX engine will still consider such an item a valid “internal” variable?
    Yes. The absence of a condition on a page item or a condition that evaluates to true simply allows it to be rendered on the page. The existence of the item in the page definition allows it to hold session state.
    We're planning to introduce a non-displaying page item type just for this purpose, sort of a scratchpad variable with no display properties, like an applicaition item but defined on a page.
    Scott

  • Mandatory field validation on Page links.

    We have created a Portal application where we included different applications as taskflows. We have also created a tabbed interface which helps us to communicate from one task flow to another taskflow. When we are in one page of taskflow and try to move to another page of different taskflow using tabbed interface we receive mandatory field validation error which prevents us to move to any other page until we fill all the mandatory fields. We need to move to different page of taskflow by using the tabbed interface even without filling all the necessary mandatory fields. Can anyone help us to resolve this issue as this is very important for our project.

    <b>Layout</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Check Pernr " >
        <htmlb:form>
          <htmlb:textView text   = "Personnel No."
                          design = "EMPHASIZED" />
          <htmlb:inputField id    = "pernr"
                            value = "<%= lv_pernr %>" />
    <%
    if lv_no_pernr = 'X'.
    %>
    <script language="Javascript">
    alert ("Personnel no. is not Valid")
    </script>
    <%endif.%>
       </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>ONINPUTPROCESSING</b>
    DATA: l_pernr TYPE persno.
      DATA: data TYPE REF TO cl_htmlb_inputfield.
      data ?= cl_htmlb_manager=>get_data( request = runtime->server->request
                                             name     = 'inputField'
                                             id       = 'pernr' ).
      IF data IS NOT INITIAL.
        l_pernr = data->value.
      ENDIF.
    CLEAR lv_no_pernr.
    SELECT SINGLE pernr FROM pa0000 INTO l_pernr WHERE pernr EQ lv_pernr.
    IF sy-subrc NE 0.
      lv_no_pernr = 'X'.
    ENDIF.
    <b>PAGE ATTRIBUTES</b>
    lv_no_pernr     TYPE     FLAG
    lv_pernr     TYPE     PERSNO
    hope this helps.
    A

  • Page item validation

    I created a page in APEX Express 4.2.3.00.08.  On the page there are two items: a text field named P55_KEY_ID and an LOV named P55_REASON with the values LOST, BROKEN, OTHER.  I created a dynamic action that enables P55_REASON when P55_KEY_ID changes. Our business rule is if P55_KEY_ID has been changed then P55_REASON must have a value, i.e. not null.  Can I define a validation on P55_REASON  with a condition to test the disabled property of the page item with javascript, if it is disabled then return false otherwise true.  Where would I place the following javascript?
    IF $x(‘P55_REASON’).disabled then
      Return  false;
    Else
    Return true;
    End if;

    What is the validation? What version are you in?
    There are some item validations that execute automatically based on settings like 'Required'.
    Date pickers has other attributes that can declaratively validate range.

  • Page item validation does not get removed

    Hi All,
         I had a page item validation defined on the page and later removed by deleting the validation in the 'page processing' in Application Builder. However, the validation still seems to execute at runtime. Can anyone tell me if it needs to be deleted from some other place as well.
    Thanks

    What is the validation? What version are you in?
    There are some item validations that execute automatically based on settings like 'Required'.
    Date pickers has other attributes that can declaratively validate range.

  • How to implement a page level validation !!

    Hello ,
    I want to implement page level validation.
    thanks
    Edited by: kumar73 on Apr 21, 2010 1:41 PM

    Should be pretty easy - your condition would probably just be the click of the button (button name) or the request value sent by the button (SUBMIT?) You can do a function returning boolean as the type
    The code would be something like:
    begin
      if :P1_SHUTTLE is not null or
      :P1_SHUTTLE2 is not null or
      :P1_SHUTTLE3 is not null or
      :P1_SHUTTLE4 is not null or
      :P1_SHUTTLE5 is not null then
        return(true);
      else
        return(false);
      end if;
    end;

  • Quotes in a page level item not showing up as " when used in a hyper link

    Hi all,
    In my app, I need to hyper link to a crystal report application with parameters from my page. I have a page level item that puts my parameter in quotes, but when the item is utilized in the hyperlink, the quotes come across as & q u o t ; (spaces were put in to the post to avoid html conversion) how can my string be used to appear the way I want?

    I don't use Crystal Reports, but, in general, you should encode your URL. When you create your link, run the URL through utl_url.escape() first. Put it in your select statement.
    E.G.,
    select utl_url.escape('http://oracle.com/foo"bar') from dual;
    will escape/encode the quotation mark and give you:
    http://oracle.com/foo%22bar
    This translates the " into a URL-safe escape code, %22, that should (I hope) be understood properly by your Crystal Reports server.
    Good luck.

  • Page copy seems to mess up item validation referenced fields in new page

    Hello team,
    this morning i create two pages as a copy of an existing page in Apex 4.0.1.
    This page contained 4 regions, each one containing 4 items, sort of:
    reg1
    P44_ITEM_A1
    P44_ITEM_B1
    P44_ITEM_C1
    P44_ITEM_D1
    reg2
    P44_ITEM_A2
    reg4
    P44_ITEM_D4
    There were field item validations defined on each pair of items P44_ITEMCn - P44_ITEMDn and each validation was associated with its corresponding field (the element attribute linking the validation with the error message visualization i mean).
    After creating the new page, i saw that some of these validations in the new page had lost their associated item attribute value or they were associated to the item with the highest item sequence, for instance P44_ITEM_A1 lost its associated item, while P44_ITEM_D1 was associated to P44_ITEM_D4.
    I just did this again a few seconds ago, so i am pretty sure this is a repeatable error.
    Flavio
    http://oraclequirks.blogspot.com
    http://www.yocoya.com

    Hi Flavio,
    I was able to reproduce this, of sorts. I created 2 regions each containing 4 page items, named in the way you describe. Then created item validations on all of those page items. Copied the page and the copied page contains some validations with a null 'Associated Item' value. Although, none were changed to a different item as you describe, in my test case.
    I have filed bug #10198224 for this issue.
    Thanks for reporting.
    Regards,
    Anthony

  • Apexlib page item validation not shown correctly

    Good morning guys! I have a question concerning the Apexlib page item validations.
    Basically I just want to validate page item values and have errors displayed in a notification region on the very same page on submit.
    I set up the Apexlib, which works perfectly for reports. However, when it comes to the page item validations, I am always rerouted to the Oracle Error page.
    Do you know why or have you experienced similar problems?
    Here is a part of the debug code when the error page is initialized.
    Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.03: ...Process "ApplyMRU": MULTI_ROW_UPDATE (ON_SUBMIT_BEFORE_COMPUTATION) #OWNER#:VT_TBL_TOTHOLZ:CNT_TOTHOLZ
    0.04: Branch point: BEFORE_COMPUTATION
    0.04: Computation point: AFTER_SUBMIT
    0.04: Tabs: Perform Branching for Tab Requests
    0.04: Branch point: BEFORE_VALIDATION
    0.04: Perform validations:
    0.04: Branch point: BEFORE_PROCESSING
    0.04: Processing point: AFTER_SUBMIT
    0.04: ...Process "ApexLib-Before Computation/Validation": PLSQL (AFTER_SUBMIT) BEGIN ApexLib_Lov.clearLovNullValues; ApexLib_Item.validateItems; ApexLib_TabForm.validateColumns; -- ApexLib_Error.showErrorStack; END;
    0.06: Show ERROR page...
    If you have an idea please be so kind as to let me know!
    Many thanks,
    Seb

    Hi Peter!
    Thanks for having a look!
    I am using Apex 3.2 and Apexlib 1.6!
    Like I said, the report validations are functioning properly! It's just the error message is not displayed on the same page in a notification field. Instead the user is redirected to the original Apex Error Page when the error is caught.
    What validation do I want to carry out?
    I tried to verify the input of a text box with $APEXLIB_MAX_VALUE=10$.
    I thought it might be a minor problem, which I couldn't find. Already checked the installation of Apexlib twice. Seems to be alright.
    Best regards,
    Seb
    PS: Have a splendid WE

  • SharePoint Error "The security validation for this page is invalid" when delete an item

    Hi,
    I have SharePoint 2010 setup and works fine until today all of a sudden it throws error "The security validation for this page is invalid" when delete a SharePoint document or list item.
    There is no custom event handler deployed on library/list, and it should not be account issue as the same account works yesterday, and even after I turn off security validation from Central Admin, it still doesn't work.
    The only change I did is turn off Dynamic Compression from IIS, after that I tried enable back Dynamic Compression but it still doesn't work.
    Does anyone know what could be the possible reasons? Thanks in advance.

    hi,
     in the page just try to make this :
    <SharePoint:FormDigest runat="server" />
    PrasadWT

  • Recommended practice for handling page level validation?

    I'm wondering what the recommended practice is for handling what I would call "page level validation?"
    For example, I have two text boxes. Either one text box or the other must have a non-null value. If they are both null, I want the page validation to fail and redisplay the page the same way it would if validation for a particular field failed. However, I don't want the message that is posted to be associated with either of the two text boxes. I want it to use some other unique ID because I want to display the error text at a location that is different than for either of the text box error messages.

    The reason I don't want to use a custom converter is because I'm using a custom tag/renderer which aggregates several HTML input components and has complex conversion logic. Maybe I could chain things together, but, a converter should be used for conversion not validation. Secondly, I don't understand why validation occurs after conversion. This seems backward to me.
    One hack that I tried which almost worked was to create a custom tag/rendererer that was an input component, but, had no visible UI. I made that component always have a value which caused the validator to always be called. I made it so that it accepted a method binding as an input so that you could specify which validation method was called. I checked the component values for the components of interest using UIInput.getValue(). However, I ran into what might be a bug. Everything worked fine as long as the value changed to a non-null value. When the value was set to null, UIInput.getValue() was returning the old value instead of null. The strange thing is that the bean property that the component was bound to, ultimately was changed to null as I would have expected to. The problem was that UIInput.getValue() was returning the old value instead of null.
    My current solution which isn't ideal is by using code similar to the following in my action method that my form submit button calls.
    if(value1 == null && value2 == null) {
    String message = "Validation Error: Value is required.";
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage("id1", new FacesMessage(message, message));
    return "validationError";
    Note, I had to create my own custom tag/renderer equivalent of h:message because I couldn't get h:message to work. h:message couldn't find the message that I posted.
    The down side to doing it this way is that the validation is occurring after the validation phase. Hence, the error message isn't displayed at the same time as other error messages. Furthermore, if you have more than one button on the form, you'd have to do the check for each action method.
    This is really stupid. I can't believe something that should be so simple is so difficult in JSF. I'm planning on taking a closer look at ASP.NET. I'm pretty sure all you have to do in ASP.NET is override a method to do this and you have access to all the form controls as variables within the Page object. i.e. no having to lookup the controls using a method and a client ID.

Maybe you are looking for

  • Key figure values in MC$K not updated

    Hi I have a situation where I run transaction MC$K (Material Analysis: On-time delivery: statistics): At first I had not done any config in transaction MCFC for the deviation of delivery date. So when I ran MC$K, the delivery date variance key figure

  • Database Connector Error in Crystal Reports

    Hi, I have a report which has two sub reports. One of the sub reports use a view to fetch data while the other uses a SP. Now the problem that i am facing is as follows- The sub-report using the stored procedure fails when i execute the main report b

  • Firefox won't let me run and executable from the website-it wants to save it

    Looks like I lost all this information when I clicked to install the troubleshooter??? again-- problem is I deleted old Internet Explorer and tried to install I.E. 8. With Firefox, I can't click download and choose run. When I click download I can on

  • Hyperlink from MY website to a specific area on EXTERNAL website

    i was hoping to use an HTML snippet to accomplish this on iWeb. i've spent several hours on google, and this forum too but found NOBODY addressing this: i need to create a hyperlink from MY website to an external url. the external page needs to open

  • FTP Error - 550 Unexpected reply code

    Hi Guys, I am encountering the following error in my QA Environment. Error Attempt to process file failed with com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeThe filename, directory name, or volume label syntax is incorrect. In my recei