Complex Validation

Hello Experts,
I have table with fields like customer, unit etc..
Customer field is Not a unique field.
Each customer should be assigned to ONLY one UNIT.
when the same customer is entered if another unit is selected then Import should fail.
For Ex:
File 1 has the following data init..
Cust   |  Unit
Xyz   |  raw-materials
Vjk    |   storage
Once this data is imported.
File 2 has
Cust   |  Unit
Xyz   |   storage
jhu     |   storage
Then this record  (Xyz   |   storage ) should  fail because Xyz should always be assigned to Raw-materials.
How can i create the Validation which checks the duplicates and verifies the Unit field value.

Hi Eva,
As you don't want to maintain it as Unique field.
As per your requirement, i also feel this thing you can take care during import of data. In Import Manager, upload a source file with New as well as with existing customers records in MDM. Now after doing all field and value mapping. In Match Record tab,Select your Matching field as Customer only. So correspondingly, in Default import action--> For newly created record (Customer: Jhu), Select default import Action as Create and for already existing customer Match Type: Exact e.g. Xyz Select Default import action tab as Skip which will fail this customer to update again. After this save map and check whether this map works fine for further coming source files or not.
I don't have MDM Access   so cant check it. Kindly revert with result if this helps you.
e.g. first time you have source file as
Cust | Unit
Xyz | Null
Next time again if cust Xyz comes with some Unit say raw-materials it will not update this record though for already existing record it has unit value as Null.
Note: It will not create customer(duplicate) with same value xyz irrespective of Unit value fill or not. So use it wisely if it fits your requirement because it will not check for Unit.
Alternative: If the above solution does not fit you and as you are checking this thing on the fly so use of BPM workflow with BRM can definitely help you where you need to search for the customer and Unit using a custom application which will search in mdm repository. if already exists in mdm so you can roll back that customer record else commit record in mdm.
Regards,
Mandeep Saini
Edited by: Mandeep Singh Saini on Dec 10, 2010 9:00 PM

Similar Messages

  • Complex "validation rule" using Java Bean code

    Hi,
    I have never used validation rules with jdeveloper, but i need a complex validation rule of one column of my table.
    Can i put a "validation rule" on an attibute of a view object, or on a column of a table, that use Bean code ?
    My column must contain different values depending of the other columns of the table, so i think i can't do this without java code...
    I tried to doubleClick on the column to create a validator, but I have put a "Print" inside, and seen that it is executes lots of times, but I want to execute the validation only when the value of the column change !
    How can I do this ? What do i need to use ?
    Regards,
    Trigger

    I have use John's solution, it works well !
    Sorry vinod_t_krishnan i am good with java but i don't know how to use well EL Expressions so I did not try your method...
    The code if so is interested...
        public boolean validateOvpdOvprCode(String ovpdovprcode) {
            RowIterator ovRubrique = this.getOvRubrique();
            RowIterator ovRubriqueType = this.getOvRubriqueType();
            String modifiable = (String)ovRubriqueType.getRowAtRangeIndex(0).getAttribute("OvrtModifiable");
            String majuscule = (String)ovRubrique.getRowAtRangeIndex(0).getAttribute("OvruMajuscule");
            String type = (String)ovRubrique.getRowAtRangeIndex(0).getAttribute("OvruTypeDonnee");
            BigDecimal repMin = (BigDecimal)ovRubrique.getRowAtRangeIndex(0).getAttribute("OvruRepMini");
            BigDecimal repMax = (BigDecimal)ovRubrique.getRowAtRangeIndex(0).getAttribute("OvruRepMaxi");
            modifiable = modifiable.toUpperCase();
            majuscule = majuscule.toUpperCase();
            type = type.toUpperCase();
            BigDecimal ovprBD = null;
            if (modifiable.equals("N")) {
                errorMessage = "Ce champ n'est pas modifiable ! Actualisez la page pour réinitialiser sa valeur !";
                return false;
            } else {
                if (ovpdovprcode == null)
                    return true;
                if (type.equals("N")) {
                    float ovprInt = 0;
                    try {
                        ovprInt = Float.parseFloat(ovpdovprcode);
                        ovprBD = new BigDecimal(ovprInt);
                    } catch (Exception e) {
                        errorMessage =
                                "Ce champ est de type numérique, il ne doit contenir que des chiffres et un 'point'";
                        return false;
                    if(repMin != null && repMax != null)
                        if(ovprBD.compareTo(repMin) == -1 || ovprBD.compareTo(repMax) == 1) {
                            System.out.println("4");
                            errorMessage = "La réponse doit être comprise entre " + repMin + " et " + repMax + ".";
                            return false;
                if (majuscule.equals("O"))
                    if (!ovpdovprcode.equals(ovpdovprcode.toUpperCase())) {
                        errorMessage = "Ce champ doit comporter uniquement des majuscules";
                        return false;
                return true;
        }

  • OC complex validation procedures discussion

    Hi all,
    So glad to find such a place here. I have used OC for 3 years and would like to make friends with you all. If you got any complex validation procedures in OC that haven't been resolved, welcome to write to me at [email protected], i would like to discuss with you all.
    fight2009

    Thanks a lot for your reply and clarification. Our Oracle DBA is in the IT Department and to ask him to put the package in production will take several days, because the IT department told us that their DBA must compile, test and validate the package passing through a long process. As I understood we have not choice and we must request the DBA to do this.
    Before OC we worked with a local system and we performed extracts from the Database to the SAS system every time we wanted to run any derivation/validation procedures.
    Best Regards,
    Nassim

  • Defining complex validations for flex items

    Hi,
    We've defined a flex regions and a number of flex items. We would like to define more complex validation logic at the entity object level, whereby we'd like to reference both 'fixed' entity attribute values as well as values of the flex items.
    Could you please indicate how this can be achieved in the validateEntity method of the EntityImpl.java class.
    We know beforehand which flex items will be displayed based on the value of one of the fixed entity attributes (e.g. if the attribute request_type='assist' then display flex items A and B, if request_type='info' then display flex items D, E and F). We use flex items because the number of request_types and corresponding 'dynamic' attributes is too large (and subject to frequent additions, deletions or modifications) to incorporate in a fixed static db table structure.
    If you can suggest alternatives to using JHeadstart flex items, these are more than welcome, of course.
    Many thanks beforehand,
    Ibrahim

    Dear Steven,
    First of all many many thanks for your prompt reply. We can use JSF EL expressions to conditionally render flex items. I'd like to illustrate my question with a simple example:
    We have three fixed entity attributes displayed:
    RequestType
    Birthday
    Sex
    and two flex items (rendered at runtime for a specific runtime value of RequestType):
    Smoker (Y/N)
    Weight
    Before saving the record I'd like to check a number of validation business rules that depend on the fixed entity attributes as well as the two flex items being displayed.
    Consequently, I'd need to be able to access the flex item values provided by the user, inside my validateEntity method (right ?).
    I can define simple validations for the flex items, but I can only access the flex item value and possibly the DependsOnItemValue.
    PS: When I define a flex item of type 'inputtext' and try to access its value using a bind variable in the validation query of the flex item e.g.
    :ItemValue = 'blabla'
    Suppose the user fills in the value Abracadabra, the validation logic substitutes as follows:
    Abracadabra = 'blabla' (which generates an Oracle error). I'd expect the following substitution to take place:
    'Abracadabra' = 'blabla'

  • Any real time complex validations and assignments

    Hi frds,
    Any one can share few real time complex validations and Assignments on product object?
    Thanks in advance
    Regards.

    Rajeev,
    I do not have real time validation exaples. There are couple of blogs on SDN
    search for
    MDM Expression Engine
    (the document name is MDM Express Engine: Validations,Assignments and More)
    Parsing and Validating Numbers
    (used for check digits but gives more insight on writing validations.)
    I hope this helps
    Regards
    Bala Pochareddy

  • Advanced and complex validation procedures

    Hi,
    We have a derivation procedure with more than 40000 caracters and impossible to split it. I know that we can create a package and put it in a created account e.g. pack and give an execute access to the rxc_pd account then call this package from OC within procedure, custom code, predetail.
    Can a Datamanager perform this work (create the package, compile it, put it in the write account and grant the access)? if yes: which tools are recommanded to do that?
    What is the common way to do for the long procedures?
    What are the common tools used by the datamanager programer?
    I will appreciate a lot for any help.
    Thanks in advance

    Thanks a lot for your reply and clarification. Our Oracle DBA is in the IT Department and to ask him to put the package in production will take several days, because the IT department told us that their DBA must compile, test and validate the package passing through a long process. As I understood we have not choice and we must request the DBA to do this.
    Before OC we worked with a local system and we performed extracts from the Database to the SAS system every time we wanted to run any derivation/validation procedures.
    Best Regards,
    Nassim

  • Complex validation rules

    Experts,
    I want to do validation check for this screen http://www.2shared.com/photo/hRS0k6yI/validation_check.html.
    The use case is :
    Basically if one of the checkbox is selected, the user need to select the radio button under it or enter some value in the text box below it.
    At a time user can only select one check box and 1 radio button below it or enter something in the text box below it.
    If what the user is looking for is not available in the checkbox option, he can enter something in the "Others - Text area- extreme right" - but he cannot select any checkbox/radio button in that case
    Can someone please tell me how to achieve this validation ?
    is there any way to do this other than writing ifs condition..
    Jdev 11.1.1.5
    thnks

    Hi,
    There is no way to write validation for your case without using if-else condition as your case deals with so many conditions and needs different messages to be thrown based on particular case.
    What is the issue with writing if conditions?
    Sireesha

  • JDev 11g: Best Practice Multi Field Validation / Reset in a Dialog Control

    I'm using JDev 11g and want to do the following (excuse my newbie learning curve):
    1. Ability for the user to have a "dialog" form that they can edit their user information such as name, password, email, etc.
    2. When user clicks OK want the system to validate that password fields are the same (there are two of them).
    3. When user clicks Cancel I want the form to reset and the dialog to close.
    Sounds easy right? However, I've seen several ways to implement and none of them seem straight forward and don't appear to work like I would want so instead spending the next day coding want to know if there's an easy solution.
    For # 2:
    The examples on the web use a phase listener for multi-form validation which when using a small dialog in a larger arena seems like overkill since the entire view will get my event right? Is there a similar thing for subform or subview?
    Another example uses a listener for value change, however that doesn't work to well when trying to validate two fields match.
    For # 3:
    A standard OK Cancel dialog does not auto reset a form within it (it leaves the text - even invalid text in the field). Adding my own button for reset doesn't close the form and adding a reset listener doesn't close the form either. Is there a simple way and I'm just overlooking it? Should I use the standard buttons and somehow assign the cancel to reset the form or define my own and somehow close the popup? There's not too much documentation I can find about using Javascript to modify objects such as closing a dialog.
    Anyone have the best approach that should be followed with less headache downstream and better portability to other forms with more complex validation? Any examples I missed that shows this working in a dialog?
    Thank you,
    Kris

    Hi,
    I don't understand #2, so ignoring it
    #1 You can set the immediate property on the two password fields. In a value change listener you compare the two provided values and if they match, you continue processing. Otherwise you set an error message and call response complete. Note that as much as we like to provide everything declarative, coding is something that we cannot neglect completely in a programming environment.
    #3 You can intercept the dialog close event and in this event determine which button was pressed. If it was the cancel button, get the current row from the underlying iterator and call refresh() passing one of the arguments you find when typing "Row." e.g DB refreshWithDBForget.
    Frank

  • List data validation failed when creating a new list item but does not fail when editing an existing item

    Dear SharePoint Experts,
    Please help.
    Why does my simple formula work in Excel but not-work in SharePoint?
    Why does this formula...
    =IF([Request Type]="Review",(IF(ISBLANK([Request Date]),FALSE,TRUE)),TRUE)
    ...work in Excel but fail when I try to use it in SharePoint?
    The intent of this formula is the following...
    If the field "Request Type" has the value "Review" and the field "Request Data" is blank then show FALSE, otherwise show TRUE.
    SharePoint saves the formula, but when a list item is saved where the formula is implemented, (under List Settings, List Validation), SharePoint does not, say anything other than that the formula failed.
    Note that the "list data validation failed" error only happens when I am creating a new item-- the formula above works just fine when one is trying to Save on the edit form. 
    Can you help?
    Thanks.
    -- Mark Kamoski

    Dear Jason,
    I appreciate your efforts.
    However, it seems to me that this statement of yours is not correct...
    "If it meet the validation formula, then you can new or edit the item, otherwise, it will throw the 'list data validation failed' error, it is by design".
    I believe this is NOT the answer for the following reasons.
    When I create a new item and click Save, the validation error is "list data validation failed".
    When I edit an existing item and click Save, the validation error is "my custom error message" and this is, I believe, the way it needs to work each time.
    I think, at the core, the error my formula does not handle some condition of null or blank or other default value.
    I tried a forumla that casts the date back to a string, and then checked the string for a default value, but that did not work.
    I tried looking up the Correlation ID in the ULS when "list data validation failed" occurs, but that gave no useful information because, even though logging was set to Verbose, the stack trace in the error log was truncated and did not given any
    good details.
    However, it seems to me that SharePoint 2013 is not well-suited for complex validation rules, because...
    SharePoint 2013 list-level validation (NOT column-level validation) allows only 1 input for all the multi-field validation formulas in a given list-- so, if I had more than 1 multi-field validation rule to implement on a given list, it would need to be packed
    into that single-line-of-code forumla style, like Excel does. That is not practice to write, debug, or maintain.
    SharePoint 2013 list-level validation only allows 1 block of text for all such multi-field validation rules. So that will not work because I would have something like "Validation failed for one or more of the following reasons-- withdrawal cannot exceed
    available balance, date-of-birth cannot be after date-of-death,... etc". That will not work for me.
    The real and awesome solution would simply be enhancing SP 2013 so that column-level validation forumlas are able to reference other columns.
    But, for now, my workaround solution is to use JavaScript and jQuery, hook the onclick handler on the Save button, and that works good. The only problem, is that the jQuery validation rules run before any of the column-level rules created  with OOTB
    SP 2013. So, in some cases, there is an extra click for the enduser.
    Thanks,
    Mark Kamoski
    -- Mark Kamoski

  • APEX validations in updateable reports built on a PL/SQL query

    Sorry if the question is not clear (english is not my mother language) or if the answer already exists on the forum (I have not been able to find it).
    I build a report on a PL/SQL function query.
    In this PL/SQL query i use apex_item.checkboxes or texts to let the end user change/enter some new data.
    As i need to do some validations on the user entries, i have already used some events (e.g. onChange) that trigger
    simple javascript validations checking if data is numeric or length of data entered....
    But i would like to use also the standard validations of APEX to make some more complex validations (e.g. checking coherency) on
    many data entered by the end user.
    I am trying to build a PL/SQL to loop through the report lines through a checkbox item i have added
    but the process of debugging is awfull for me.
    - Is there a pointer to a code example of validations within a query report that would help me in achieving this validation
    - or could someone give me some clue on how to acess these report data in the interface.
    Thanks in advance,
    Daniel

    Daniel:
    You can check out Denes Kubicek's APEX demo site for ideas on how to create validations for a tabular form.
    http://htmldb.oracle.com/pls/otn/f?p=31517:41:3322496527336906:::RP,::
    Varad

  • GL account validations in MR41

    In MR44 when we post a document it prompts u an error messge if the GL account is blocked. This is not the case with MR41, it will create a document no even though the GL account is blocked. I want to put the same validation of MR44 for blocked GL account in MR41 also.
    Regards
    Karan

    You can create custom validations in OB28 for FI postings. For mor complex validations use program RGGBR001 and link to your validation in OB28. You could filter on transaction MR41 and thencheck the master data settings for the GL accounts that are posting.
    pls assign points to say thanks.

  • Where to put validation logic...

    Hi,
    We have a lot of validation logic in our database. Next to the normal foreign key, check, unique constraints, we use triggers for validation (which throw errors with custom error codes when needed).
    On top of the database we are building a fairly large JClient based application using the BC4J framework. BC4J offers the possibility to use validation beans for validating the entity row. We are wondering if we should use this. If we implement the validation logic for each entity we are actually duplicating the validation logic that's already available in the database. And some database constraints are easily implemented using the standard validation beans (like not null and unique checks), but more complex validation rules can sometimes only be done in the database (so we need to use the database for validation using a method validation bean).
    Like I said this means a lot of duplicating validation logic. Which first of all is an inefficient thing to do. Second validation logic can change over time, which means we need to change the logic on two places. It's easy to forget to change the logic on one place.
    We found a way to somewhat use the database validation logic for validating entity rows. We just simple insert a row in the database and post the changes. If the new row contains an error an exception is thrown. This JBO exception contains a reference to the SQL exception. Which can be used to retrieve the database error code. Unfortunately we have not found a good way (yet) to find out where the error occured (in which trigger for example). Error codes don't have to be unique so it's important to know in which context they occured. Another problem with this method is we can't do an early validate on a limitted set of row data. E.g. we sometimes use wizards in our application for adding new rows. We really want to check the data after each step in the wizard (step by step). This is ofcourse impossible with the database logic. This means we again need to create the same validation logic again. I don't think it's even possible to use the row.validate() method for this (and ofcourse implement the validation logic in the entity too), because this method validates the complete row.
    In short, where is the best way to put validation logic? And (how) can this be done without duplicating (to much) logic?
    Regards,
    Peter
    P.S.
    Does anyone know how to retrieve the context of an SQL exception?

    Do you users have access to the data/tables outside
    of using your application? (as in using sqlplus?)Not at the moment.
    Ideally the database should just be going
    constraint--data integrity type of checks. The
    business rules would be in the business layer not
    persitance layer..So in this case, they would be in
    the bc4j entity objects.. Well most of them are simple integrity constraints, but sometimes we have to check things using triggers which are way more complicated and need extensive database access. It's more logical to do that in the database. If the trigger runs into a problem it raises an application error. We are hoping we can use this error somehow in our application.
    That assumes that the only way a user can modify that
    data is through your application only.Well it is, and if another application is written for it the BC4J entities etc. will probably be re-used, but like I said there are other reasons for not having all the business-rules in the BC4J layer.
    by the way, are you migrating an existing application
    that already has all the business rules in the
    database?No, it's a brand new application, but we started out with defining a lot of business rules in the database because that seems a more logical place to put them (to us). I understand that some business-rules can better be implemented in the BC4J entities, but it's not that easy for every business rule we have.
    Regards,
    Peter

  • TopLink - Best Practice Question - Object Validation

    We are fairly new to TopLink and have a question about doing object validation. We would like perform some validation on our objects that are about to be persisted to the DB. Since TopLink will persist all objects that are reachable from the ojects that are registered (I think) we would like to send a message to each of these objects (validate) before they are persisted. If the object validation fails, we will throw an exception (and the objects will not be persisted), hopefully such that the exception can be received by the client. Has anybody done anything similar to this before, or is there a better way of approaching this?
    TIA for any help.

    Are you using EJBs?
    If so, there are a couple of options that may work better for you.
    1. You could use the ejbStore method for your validation and throw the exception in there. You should be able to get the exception on the client side, but it may be wrapped in several layers.
    2. For more complex validation, you may want to use a session bean to control the validation process. It can interact with your entity beans and provide feedback about why validation fails.

  • Lead Management Validations - PCUI

    Hi, I am creating new fields for Lead Management and I did this using the easy enhancement workbench, now I need to make some validations on the data from those fields based on data on other fields from the lead.
    Is there a BADI I could use for this? Or is there a better way to do this than using a BADI?
    Thanks a lot for your cooperation.

    Hi Felipe, regarding your question, when would you like these validations to take place and how would you like the results of these validations be presented? When you want these validation being performed at runtime, e.g. after pressing enter and the results to be displayed in the message subscreen at the top of the screen you should have a look at the following IMG path: CRM -> Basic Functions -> Incompleteness. For 'simple' validations you can define custom procedures and for more complex validations you can use the second option in that path. In the case these validation should occur upon save, have a look at BAPI 'CRM_LEAD_H_BADI ', method 'CRM_LEAD_H_CHECK'. Hope this answers your question, Tiest.

  • Number validation format mask...

    Can't find an example within the widget sample for the text
    field widget that illustrates how to use a regular expression to
    control the acceptable format of number value. I need to be able to
    allow users to enter up to 8 number similar to the comma_dot
    example. The exception is that I want to separate every 3 numbers
    by a comma while still only allowing one dot. Acceptable values
    will be "000,000.00"; "00,000.00", "000.00"; "00.00"; or
    "0.00".

    Hi FyiGuru,
    In think in your case using the currency validation with the
    'comma_dot' format, and maxChars=10 (8 numbers plus the separators)
    will do the trick.
    If you need more complex validations, you can do the
    validation with your own function:
    var field1 = new Spry.Widget.ValidationTextField("field1",
    "custom", {validation: customFunc});
    To see this in action, check the the 8th example on
    this
    page.

Maybe you are looking for

  • Reports 3.0 OLE 2 Objects

    Does anybody know if it is possible to display an OLE2 image over the web when compiling the report in .pdf format ? I know it is possible if you compile in .html format using the URL Link functionality, but the format quality ( e.g. fonts, tables, c

  • Unable to upload images

    As of a few days ago I am unable to upload images online. First I noticed it with a Mixbooks and then with Ebay. In some cases it starts to load it and then starts over and over without any success. On Ebay it just sits there preparing to upload. I t

  • Saving a PDF in Acrobat 9 with comments enabled for viewer

    Hi, Is there a quicker way to enable comments for Reader than actually having to choose to do so? I have maybe 30-40 files saved as a PDF but they do not have comments enabled so I have to open each one and click on enable comments for Reader. That t

  • Problem in loading images at runtime

    hi ~ I am facing some problem in making a dynamic flash application. Actually i have to loading certain images from a remote database at runtime into a pre-existing flash file. i have tried it by putting static images and converting them movie clips.

  • Baseline iMac 2.0ghz for iMovie/iDVD/iPhoto

    I plan to use my baseline 2.0ghz iMac with the standard specs for iMovie projects with my firewire camera(most videos would be 30mins-1hour long....burning the edited videos with iDVD...and using iPhoto to organize 5000 photos... 1) is iMovie going t