Validation expression help

Hi All,
I have requirement like having two fields
Status(Lookup) and Date (Literal Date)
Business rules as follows
1) If "Status" = "Draft" then Date value should be equals to 09/09/9999
2) If "Status" <> "Draft" then Date value should not be equals to 09/09/9999
I tried with validation Expression Has_Any_Values, but no use.
Can any one please help me on this....
Thanks
Anil

Hi Priti Thanks for your reply...
I don't want to assign date in Date field.'
Validation requirement are
1. If i select Status = "Draft" then i can select date only 09/09/9999. It should give an error message if i select any other date except 09/09/9999
2. If i select status other than "Draft" Ex: if i select Status "Active". Date field should not allow to select 09/09/9999.
Shiv - I think my explanation is clear now.
I wrote validation for 1st scenario
IF(HAS_ANY_VALUE(Status.Name="Draft",TRUE), HAS_ANY_VALUE(Date="09/09/9999",TRUE))
But its not working as required.
What i came to know is if Date field Data Type is Text is working fine. But in my data model we declared Date field Data type as Literal Date. so it's not working and now i cannot change data type here we have lots of data in it.
can any one have sugessions to implement these validations please welcome.
Thanks,
Anil

Similar Messages

  • Validation expression for Comparitive check

    Hi,
    My scenario is to fire a validation error when,
    Field A is filled and Field B is not filled.
    If Field A and Field B is filled there should not be any validation error.
    Can any body send the validation expression to achieve this?
    Best regards,
    Arun prabhu S

    Hi Arun,
    According to your requirements and if I am getting it right the the validation should fire in the following cases.
    (1) Field A is filled and field B is not filled.
    (2)If both the fields are blank.
    Correct me if I am  wrong the validation should not fire if field A is blank and field B is filled.
    IF(IF(IS_NOT_NULL(Field A) OR IS_NULL(Field A),TRUE,FALSE) AND IF(IS_NOT_NULL(Field B),TRUE,FALSE),TRUE,FALSE).
    Reward if Helpful,
    Regards,
    Vinay Yadav

  • Validation expression, with a Boolean field

    Hello,
    My issue is as follow: I want to make sure that if attribute 'A' = "1"; then attribute 'B' has values.
    Note: attribute 'A' is boolean.
    I did not succeed in setting up such a formula [I succeeded in setting up the opposite formula only: 
    IF(Attribute 'A',IS_NULL(Attribute B))
    Thx for any help,
    Rémi Dusaud

    Hi Remi,
    attribute 'A' is a field of type Boolean in main table, right which has two values 1 and some other value, right?
    if this is right then i hope you have also set True Value as 1 and False Value as something in MDM Console. Because Boolean field has only two values which you can set through Console by default True value = TRUE and False Value = FALSE, here you need to change it to 1 and other value as per your requirement.
    For the same this expression works as given by me in above post.
    If this is really Attributes, name as Attribute 'A' and Attribute 'B' in taxonomy mode of data manager.
    and by Boolean you mean here that Attribute of type Text but has two values 1 and some other value.
    if this is true then you want a record in maintable is associated with a category which is linked with these two Attributes, and if Attribute 'A' has Attribute Value as 1 then Attribute B should not be null, in this case firstly you have to create a validation and then right click on this validation and then Add Branch select here Branch Value(category which is linked with these two attributes). a new validation gets created with this branch Value.
    now write expression in this Branch validation expression as same:
    IF(attribute 'A' = "1", IS_NOT_NULL(attribute 'B'))
    But here you need to select Attribute 'A' and Attribute 'B' from Attributes Tab in validation expression.
    and select "1" from Text Values Tab in validation expression.
    let me know if you still face, in both ways this expression is working fine at my end.
    Regards,
    Mandeep Saini

  • Problem with window of 'validation expression'

    Hello all,
    I have a very stupid problem and it stuck me since half an hour !!
    Indeed, i don't know how i did it but i move the window we use for creating our validation/Assignment rules (field validation expression) somewhere and i don't see it anymore. when i am clicking on the button '...', the window appears somewhere (can select it through the alt+TAB) but i cannot see it !!!!
    Is there a way to initialize this ? in order this window to come back at its standard size ???
    Thanks,
    JP

    Found the solution !!!
    For infos :
    Note 1277807 - Expression building window is not shown after launching.
    The Data Manager window for the expression builder is "missing" and is not visible after launching it.
    Solution
    It could be that the pop-up window that opens for the expression builder is "hidden" or if a two monitor set-up was used in the past it might not be visible.
    In order to find the missing window please try the following:
    1) Open an existing validation or create a new one then click on the
    three dots.
    2) Press Alt + Spacebar.
    3) Press the down arrow once and then Enter.
    4) Using the Left and Right arrow keys press one of them continuously in one direction and then the other to see if the missing dialog box will appear.
    Thanks all for your help
    Edited by: Jean-Philippe PAIN on Mar 3, 2010 4:49 PM

  • How to pass column header as a parameter in Validation Expression (APEX4.0)

    Hello
    I created a new Page validation in APEX4.0 ( not 4.1 ).
    (1) Type : Function Returning error text
    (2) Validation Expression 1 :
    begin
    return validate_name ( p_c=> #COLUMN_HEADER# ,p_c_value=> to_date(:p26_LEAVE_FROM,'dd/mm/yyyy') );
    end;
    note: the validate_name is an oracle pl/sql procedure which takes two input parameters ( column header name and actual value ) and return a specific error message ( to that column ) or NULL.
    (3) In the Error Message section, I left Error Message blank ( as the app ignored the mssage but used the one returned from the above function)
    However, I chose "The Error display location" to be inline with field and notification" and Associated Item to be "p26_LEAVE_FROM".
    My question, it worked if I hard coded the actual column header "LEAVE FROM" , but it didn't work if I used the above #COLUMN_HEADER# in Validation Expression. Can I avoid hard coding as the column header might be changed one day. Is there a better way to deal with multiple column validations with different error message for each column ? It seems that I will have to create similar page valiation for each column to be validated.
    Thanks for your advice.
    Edited by: Susanna on 19/01/2012 17:45

    You want something like this:
    DECLARE
      lio_success  VARCHAR2( 2000 );
      li_id        NUMBER;
      li_dep_id    NUMBER;
      li_sel_id := NUMBER;
      li_date DATE;
      lo_date DATE;
      lio_return_message xyz_bpe_rec_fn.xyz_bpe_rec_col;
      l_ret xyz;
    BEGIN
      lio_success := 'some value';
      li_id := NULL;     -- or some number
      li_dep_id := NULL; -- or some number
      li_sel_id := NULL; -- or some number
      li_date DATE := sysdate;
      lio_return_message.col1 := somevalue;
      lio_return_message.col2 := somevalue;
      lio_return_message.coln := somevalue;
      l_ret := get_xyz( lio_success
                      , li_id
                      , li_dep_id
                      , li_sel_id
                      , li_date
                      , lo_date
                      , lio_return_message );
    END;
    /

  • Will an Airport Express help with the signal I am not receiving on my Smart TV?

    Will the Express help with internet issue's I have with my new Smart TV?

    If you already have another Apple AirPort router that is providing your wireless signal, then a new AirPort Express could extend that wireless signal to provide a stronger wireless signal to the TV....assuming that the TV connects using wireless.
    Is this what you are asking?
    Or, would the Express provide other services to "help"?

  • Hello , I have a license CS6 4 posts (3 installed on PC) I just got a mac so I wanted to install the latest license it but when I want to register on the site adobe it tells me that " the number provided is not valid "can help me thank you

    Hello , I have a license CS6 4 posts (3 installed on PC) I just got a mac so I wanted to install the latest license it but when I want to register on the site adobe it tells me that " the number provided is not valid "can help me thank you

    Contact support by web chat.
    Mylenium

  • How to get result of MDM validation expression with type warning?

    I need  to get result of MDM validation expression with type WARNING (in automatic execution),
    but - method validationResult.getFailedValidations(..) returns validation if it has type ERROR,
    so all Warnings treated only as success despite it returned false or true.
    My question - how can I get that 'false or true' expression resut for validation.
    thanks

    Hello Vladimir
    By my opinion, hook warning exception isn't make sense because after warning message data will be change(upload).
    Moreover  if you start validation from WF Warning exception doesn't work at all.
    If you want to do some data changes you should use and hook Error exception.
    Regards
    Kanstantsin Chernichenka

  • TS1292 I put the code in correctly but it says, "The Gift certificate or prepaid code has not been properly activated." or "The code you have entered has not been recognized as valid." Help ?

    I put the code in correctly but it says, "The Gift certificate or prepaid code has not been properly activated." or "The code you have entered has not been recognized as valid." Help ?

    You will need to contact the iTunes Store.

  • My ipad 2 and ipod touch keeps on dropping wifi connection,  would getting an apple router or maybe airport express help?

    ipad 2 and ipod touch  keeps on dropping wifi, would upgrading to an apple router/airport express help?  all my other pc's work well with my current network.

    Have you checked for a firmware update for your current router?
    What make, model, version router do you have?

  • Timespan - Validation Expression

    I need to check wether the entered dates are within a year or not.
    If not the app has to throw an exception
    At the validation's page - Validation Expression 1 - window i tried the following:
    Datediff (day, :P4_start, :P4_end) <=366
    as type i chose SQL Expression
    What's wrong with it!?
    Error message:
    Error ERR-1023 Unable perform validations.
    ORA-06503: PL/SQL: Function returned without value

    DATEDIFF is a function I know from MS SQL Server 2000, Syntax as follows:
    DATEDIFF(days/months/...,'startdate', 'enddate')
    the function normally returns the amount of days/months/.. that are between the two dates.
    Maybe Oracle uses a totally different function/syntax to achieve the same goal!?
    If so, please tell me.
    Mike

  • Trying to create a Field Validation Expression and need help

    I have a picklist field and another field that are in question. I want to set some sort of rule that forces the second field to be populated only If specific values are selected from the picklist field.
    I was going the route of a field validation Rule, but everything i've tried so far does not produce the results i am trying to achieve.
    The first type of expression i tried was:
    ([<plProduction_Print_Account_Category_ITAG>] <> LookupValue("OCC_CUST_LOV_ACCOUNT_1", "No Production Print") AND ([<stSIC_Code_ITAG>] IS NULL))
    This is generating the field validation error message when i select any of the correct values from the picklist. the problem is still the second field, which will generate the error if a value is entered into the second field, regardless of the picklist value selected. Switching the "IS NULL" to "IS NOT NULL" only reverses the problem on the second field, causing the error to generate when the second field is updated to a NULL or blank value.
    I also tried :
    = 'No Production Print' AND [<stSIC_Code_ITAG>] IS NOT NULL
    and got similar results.
    ([<plProduction_Print_Account_Category_ITAG>] = LookupValue("OCC_CUST_LOV_ACCOUNT_1", "No Production Print"))
    Similar results as well.
    Does this need to be an IIF statement? Do I need to make this a workflow expression instead? i could really use some help as I have tried everything i can think of and admit, i'm not the expression guru!!!. Any assistance would be appreciated.
    TeknoMan

    Yes we have the same request and we used the following expression. Example we have a field "Método de pago" ( [<plMtodo_de_pago_ITAG<]), it's values are "CHEQUE and DEPOSITO" if we select DEPOSITO three more fields were requiered Route, Sucursal de banco and Clabe so we have to put this validation in the four fields including Metodo de pago.
    [<plMtodo_de_pago_ITAG>] <> "DEPOSITO" OR ([<Route>] IS NOT NULL AND [<nSucursal_de_banco_ITAG>] IS NOT NULL AND [<stCLABE_ITAG>] IS NOT NULL)
    well in the field CLABE we put the following [<plMtodo_de_pago_ITAG>] <> "DEPOSITO" OR ([<Route>] IS NOT NULL AND [<nSucursal_de_banco_ITAG>] IS NOT NULL AND [<stCLABE_ITAG>] IS NOT NULL AND Len([<stCLABE_ITAG>])=18) this was because the len of the value must be 18 characters.
    I hope this works for you
    Regards Catalina Valadez
    Edited by: CatalinaV on 12/03/2009 10:54 AM
    Edited by: CatalinaV on 12/03/2009 10:55 AM

  • CFINPUT Reg Expression Validation Pattern Help

    I've got a form with a non-required field that needs to meet
    some validation requirements (Numbers, Letters, 'space character'
    or 'blank, empty string' only) if the user chooses to fill it
    out...
    I'm using CFINPUT tag with the following settings, does my
    Reg Expression pattern look OK?
    REQUIRED="No"
    VALIDATE="regular_expression"
    PATTERN="^[a-zA-Z *]{1,40}$"
    MAXLENGTH="40"
    Thanks for any help. I'm v. new to regular expressions (10
    hrs education at Google Univ.)
    Sincerely,
    Paul Cross

    I think you want something more like this:
    ^[a-zA-Z0-9 ]{0,40}$

  • Help with validation expression

    I could really use some help. The following validation item works. It keeps new records from being submitted when the p1_units field is greater than 10.
    if v('p1_units') <= 10 then
    return null;
    else
    return 'test';
    end if;
    This is not what I want though. What I want is to use the following in place of where I have the 10.
    select s1 - s2 from
    (select sum(units) s1 from units_avail where trunc(add_date) <= trunc(sysdate) and model = '56478') t1,
    (select sum(units) s2 from orders where model = '56478') t2
    This sql statement is used else where in the application and it returns the current count of unit available by summing of the total of all orders and subtracting that from the total of all inventory receipts.
    Thanks in advance.

    Hi,
    If I understood your post correctly this PL/SQL procedure would help:
    DECLARE
    v_number NUMBER(5);--select precision and scale according to your task
    BEGIN
    select s1 - s2 into v_number
    from
    (select sum(units) s1 from units_avail
    where trunc(add_date) <= trunc(sysdate) and model = '56478') t1,
    (select sum(units) s2 from orders where model = '56478') t2;
    if v('p1_units') <= v_number then
    return null;
    else
    return 'test';
    end if;
    END;
    Val

  • Phone number Regular expression Help

    Hi,
    I am trying to validate phone number using regular expression.
    The format shoud be either of the two given below. It should not
    accept phone number of any other format other than the once given below.
    I tried out the following regular expression
    pn.matches("[\p{+}][0-9]+ ")
    but it accepts alphabets too(which is wrong).
    How do i check if the phone number is of the following format(OR condition).
    0401234567
    +358501234567
    Any help would be kindly appriciated.
    Thanks
    Sanam

    There will probably be much more constraints on you phone numbers, but here's a start:String[] numbers = {"0401234567",      // should be ok
                        "040123456",       // wrong, one number too little
                        "+358501234567",   // should be ok
                        "+3585012345670",  // wrong, one number too much
                        "+35850123456"};   // wrong, one number too little
    String regex = "\\+[0-9]{12}"+         // a + sign, followed by 12 numbers
                   "|"+                    // OR
                   "0[0-9]{9}";            // a zero, followed by 9 numbers
    for(String n : numbers) {
      System.out.println("Is "+n+" valid? "+n.matches(regex));
    }

Maybe you are looking for

  • Clearing Values in Sctript

    i am issuing the output from VF31. there are some values(serial numbers) are there to display in the script .if first document have the five values and second have only one even it is dipslyin five.previous values are not clearing. even i am not call

  • All the Applications to download for a free trial of 30 days are missing in the Creative Cloud Desktop Application

    Hi, I would like to download a trial version of 30 days of Adobe Muse and the link to download brings me in this screenshot, where I don't find any possibilities to download the app.+ I have a Macbook Pro Retina with OSX 10.9.5 Anyone knows how to so

  • Psd files are being saved as .14 file format and I cannot open them

    I have been creating a few large (100MB+) files in Adobe Photoshop CS4. I saved the files both as .psd and .jpg. When I restarted my computer the next day, I went to open the file and instead of seeing the normal Photoshop icon on the file it was jus

  • Entry Wise Line Item Report in Finance

    Guys My client is using SAP 4.7. Is there any built option available when I can put the entry date wise line item report in Finance Thanks SH

  • Mail server 10.6.7

    Hi, I have problem with receiving msgs on our mail server. But just only mssgs with attachements. (tested on PDF file) Looks like server get connected then transfer data but after few minutes timeout and lost connection. from log: Jul 18 09:57:32 odm