Use of application Item with conditional validation

Apex 3.2
On a form, I have two lists :
- Items TYPE contains A B C and D.
- Item MANAGEMENT contains NULL, 1, 2 and 3.
I want to validate that MANAGEMENT is not null only when the value in TYPE are A, B or C.
I am using the condition "Value of Item in Expression 1 Is Contained within Colon Delimited List in Expression 2"
I dont want to hard code these values (A B C) so I put them in an Application Item (I also need them somewhere else).
If I use my application Item in the condition, the validation is not performed (I dont see it listed in debug mode.). If I use the real values (A B C), its working.
Here's what I put in the Exp2 when using the application item :
F126_CONST_BUSINESS_CASE:F126_CONST_PROJ_NON_PLANIFIE:F126_CONST_PROJ_PLANIFIE
I also tried with the form v('F126_CONST_BUSINESS_CASE'): ...
Any Idea ?
Thanks in advance.

Hi Amelie,
You should consider centralizing your validations inside a package. It will make your code much more readable. In many cases, you won't have to modify your application to modify a validation.
If your validations are required across different pages, consider having a main package or build package a package for each module (page or page groups).
The following condition for a validation is easier to understand than "Value of Item in Expression 1 Is Contained within Colon Delimited List in Expression 2".
Condition Type PL/SQL Expression:
p1_valdt_pkg.is_item_mangm_mandt(:P1_ITEM_TYPE,:P1_ITEM_MANAGEMENT)
create or replace function is_item_mangm_mandt (pva_item_type in varchar2,
pva_item_mangm in varchar2)
return boolean is
vbo_valdt boolean default true;
vva_const_business_case varchar2 (30) default v ('F126_CONST_BUSINESS_CASE');
vva_const_proj_non_planifie varchar2 (30) default v ('F126_CONST_PROJ_NON_PLANIFIE');
vva_const_proj_planifie varchar2 (30) default v ('F126_CONST_PROJ_PLANIFIE');
begin
if pva_item_mangm is null
and pva_item_type in (vva_const_business_case, vva_const_proj_non_planifie, vva_const_proj_planifie) then
vbo_valdt := false;
end if;
return vbo_valdt;
exception
when others then
return false;
end;
Louis-Guillaume Carrier-Bédard
My Blog: http://www.lgcarrier.com
Twitter: http://www.twitter.com/lgcarrier
APEX Québec: http://www.apexquebec.com
APEXFramework: http://www.apexframework.com

Similar Messages

  • I get the message "You cannot use the application "AdobeApplicationManager" with Mac OS X

    I get the message "You cannot use the application "AdobeApplicationManager" with Mac OS X

    Hi LegallyArmedAm,
    Are you still getting the message?
    -Dave

  • Cannot use the application "Safari" with Leopard

    When I try to open Safari in my non-admin account I get an error message reading 'You cannot use the application "Safari" with this version of Mac OS X'.
    Bizarrely, if I logon as the admin account it works perfectly.
    I have repaired permissions, run software update, repaired permissions again, logged in as SU and fscked and still the same thing. I discovered that Omni Outliner would open the plist but I don't have the knowledge to interpret that.
    I think I have used Safari on this laptop since upgrading to Leopard. Most of the time I use Firefox so it hasn't been an issue anyway. The really bizarre thing is it works normally in the admin account.
    All suggestions welcome.

    Thanks for that. Tried it to no avail
    I have found out what has gone wrong but I have no idea how.
    I keep all my browsers in a subfolder of the applications folder. I trashed Safari with the intention of downloading a clean version from the Apple website. When I got there I couldn't find a version for OS X (there may be one, it just isn't obvious). So I thought I'd just try Safari one more time from my admin account. Of course the app wasn't in the browser folder. So I went to put it back in the applications folder with the intention of moving it from there to the browsers subfolder.
    But no. There was already a newer version in the applications folder. How did it get there? I have no idea. But it opens. So I've moved it to the browsers subfolder and it still works.
    So problem solved. I don't understand how it happened. And especially why it worked all along in the admin account.
    Thanks to everyone who suggested solutions.

  • Which situation should we use the text item with the item category TATX

    Dear experts!
    Thank you for your attention!
    I am confused with text item (TATX).
    which situation should we use the text item with the item category TATX????
    Someone told me that the text item is dummy and should be used as a manual of certain standard item. But the manual may be a book or several papers and it also takes up some inventory not a dummy.
    So, could some body tell me what the text item (TATX) exact is and what function it has.
    Best regard!
    Tangdark

    Hi,
    you can use TATX if you like to enter a text and to print some information between the item lines.
    Regards
    William

  • "YOU CANNOT USE THIS APPLICATION SAFARI WITH THIS VERSION OF MAC OS X"

    hi, just downloaded the update for mac 10.5.1 - all went well - then tried to open Safari and received this message "YOU CANNOT USE THIS APPLICATION SAFARI WITH THIS VERSION OF MAC OS X" - I have tried downloading Safari again through netscape but that does not seem to work either - ANY IDEAS???? Thanks

    It sounds likely that you have more than one copy of Safari on your hard drive. The one in your Applications folder is the one you should have. The one you're trying to launch is an older version that somehow got moved somewhere else, so that the new version got installed in your Applications folder (where it should be) while the old version is running (or trying to run) from another location.
    First, double-click on the Safari application file that you have in your Applications folder. Does it run properly, without error messages? If so, everything is fine. You just need to get rid of the old version of Safari and set it up so you can easily launch the new version that is in your Applications folder.
    Are you clicking on the Safari icon in your Dock when you see the error message? If so, do this: Control-click on the Safari icon in your Dock and select "Show in Finder" from the contextual menu. A Finder window should open showing the location of that copy of Safari. If that Finder window is any location other than the Applications folder, delete the Safari file that is in that folder. Then drag the Safari icon out of your Dock. Navigate to your Applications folder and drag the Safari file from the Applications folder to your Dock.
    You should be all set, but click on the new Safari icon in your Dock to make sure it is the correct version and runs without problems.
    Message was edited by: Rachel R

  • " You cannot use the application "iTunes" with this version of MAC OS X."

    I am getting the response " You cannot use the application "iTunes" with this version of MAC OS X." How do i get Itunes on my Mac. I tried to download the newest version but it won't let me do that either.

    What operating system version are you using on your Macbook?  If you are still using Tiger 10.4 the new iTunes requires Leopard (10.5) or higher.

  • I have a US Mac living in the UK. I tried to download both the British and American version. Both state "You cannot use the application Firefox with this version of MAC OSX". Any suggestions how to proceed?

    I have a US Mac living in the UK. I tried to download both the British and American version. Both state "You cannot use the application Firefox with this version of MAC OSX". Any suggestions how to proceed?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. You can get the latest version of Firefox 3.6 which works on OS X 10.4 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Need help in use of application item - value to be changed dynamically

    HI ,
    i have created a application item and i want to change the value of the application item when user link the URL link
    for eg- I have two link -
    htp.p('<tr><td>AABB<td>');
    (a href="f?p=&APP_ID.:6:&SESSION..:F129_DB_NM:XXXXX">page 1)
    htp.p('</a></td>');
    (a href="f?p=&APP_ID.:6:&SESSION..:F129_DB_NM:YYYY">page 2);
    htp.p('</a></td>');
    If user click first link then i want the value of application item shuld chnage to XXXXX and it pass the same to page 1.
    and vice versa.There is no if condition in this.
    Please let me know on this.What i need to do in this more.
    Edited by: 946963 on Oct 22, 2012 4:06 AM

    946963 wrote:
    thanks for this .I have links with me its working fine.
    Problem is that it is not chnaging the value of application item .
    When i click on first link then i want to pass value XXXX for applicationitem for page 1 and value YYYY for page 2.This same value i have to pass further to page 3.
    How can i do this Please let me know on this.Have you opened the link that I gave in my prev post??
    //change your code to look like this
    //notice the colons before your application item
    htp.p('<tr><td>AABB<td>');
    (a href="f?p=&APP_ID.:6:&SESSION..::::F129_DB_NM:XXXXX">page 1)
    htp.p('</td>');
    (a href="f?p=&APP_ID.:6:&SESSION..::::F129_DB_NM:YYYY">page 2);
    htp.p('</td>');

  • Problem in using nested dependent items with jheadstart 1013

    Dear JHeadstart Team,
    Suppose we We have 3 following tables ( z is child of y and y is child of x) and we have a view object which have joined all 3 tables together. we have
    mad a page on this view.
    x (
    code1 PK
    ,Name
    y ( code2 PK
    ,x_code
    Z ( code3 PK
    , y_code2
    MyViewObject contains the following fields : z.code3,z.y_code2,y.x_code,y.code2,x.name,x.code
    I want that when a user enter a valid value in y_code2 field it automatically retrieve related information of that code and show it. we set "depends on
    item property" of x_code ,code2,name ,code1 to y_code2 but when user enters value for y_code2, only code2,x_code get correct value and
    code1,name remain null. I also set "depends on item property" of code1,name to code2. I hoped that with changing the value of code2, these field got
    correct value but again these fields remained null.
    To simplify the situation I removed the x table from view object and add a transient field to view object (which use a database function with this format
    getXName (y.x_code) ) but surprisingly enough It did not work either.
    These seemed to me something like bug. Am I right? Is there any workaround for these problems ?
    What is the best solution for implementing this functionality ?
    Best Regards,
    Navid
    P.S. We are using JHeadsart 10.1.3 Service update 1 and jdeveloper 10.1.3

    Dear Steven,
    Thank you very much for your paying attention to this matter. I checked the adf bc tester and I realized that when I filled y_code2 only the fields in the y table were automatically updated. To simplify the problem I made a simple project based on the HR schema objects using JHeadstart . I add country and location to department view object and checked it with adf bc tester. I realized that when I enter value in locationId in the department view only location fields are automatically updated and country fields remain null. I also used your techniques in the "What to do when ADF BC Tester does not update the lookup item" section but it does not work either. I think that maybe the normal behavior of ADF is to just fetch only the first level lookup information and ADF does not care to fetch information of lookup of lookup ( I mean nested lookup).
    I understand now that my problem is not a JHeadstart related issue however any help,reference or link to implement such functionality would be highly appreciated.
    Best Regards,
    Navid

  • How to create a script logic using two applications and some conditions?

    Hi All,
    I am using BPC 7.0 MS
    I have two applications, one called RATE (Dimensions: Category, InputCurrency, Rate, RateEntity, Time) and one called GYP (Dimensions: Category, Entity, PL, Producto, RptCurrency, Time. In the GYP application for Revenues. I have the followings products:
    Product code
    1-808-912-433
    3-208-345-542
    11-869-789-946
    13-456-786-890
    I need to calculate a discount using the first digits to identify the product: 1, 3, 11 and 13, based on some percentages that are in the RATE application. 
    I have an element in the RATE application for each one of them.
    DPC1
    DPC3
    DPC11
    DPC13
    What I am trying to do in the script logic is:
    *XDIM_MEMBERSET PL=Revenues
    *XDIM_MEMBERSET PRODUCTO=<ALL>
    *XDIM_MEMBERSET ENTITY=<ALL>
    *XDIM_MEMBERSET CATEGORY=Budget
    *LOOKUP RATE
    *DIM D1:RATE ="DPC1"
    *DIM D11:RATE ="DPC11"
    *DIM D3:RATE ="DPC3"
    *DIM D13:RATE ="DPC13"
    *DIM RATEENTITY="Global"
    *DIM INPUTCURRENCY="VEB"
    *ENDLOOKUP
    *WHEN PL
    *IS Revenues
    *REC(FACTOR=LOOKUP(D1), PL=Discount)
    *ENDWHEN
    *COMMIT
    In the WHEN area, i would like to create some condition to identify the product and assign the correct percentage to it but i don't know how to do it?
    Do you have any suggestions?
    Also, because i need to key the values in the RATE application for the discounts, the logic should be run from this application?
    Using RUNLOGIC like this:
    *RUNLOGIC
    *APP GYP
    *LOGIC Discounts
    *ENDRUNLOGIC
    Best regards,
    Luisana

    Hi Nilanjan,
    Thanks for your prompt reply.
    The special characters ("-") cannot be used. The product codes use the special character ("_").
    I understand what you said about the property for the dimension Product but not for the dimension Rate. I have the lookup that has the four elements (DPC1, DPC11, DPC3, DPC13). It is not supposed to get the data from those elements directly when using the lookup?
    The script logic is still not working. I created the dimension property in the product dimension and the new script logic is as follows:
    *XDIM_MEMBERSET PL=Revenues
    *XDIM_MEMBERSET PRODUCT=<ALL>
    *XDIM_MEMBERSET ENTITY=<ALL>
    *XDIM_MEMBERSET CATEGORY=Budget
    *LOOKUP RATE
    *DIM D1:RATE ="DPC1"
    *DIM D11:RATE ="DPC11"
    *DIM D3:RATE ="DPC3"
    *DIM D13:RATE ="DPC13"
    *DIM RATEENTITY="Global"
    *DIM INPUTCURRENCY="VEB"
    *ENDLOOKUP
    *WHEN PRODUCT.TYPE
         *IS 1
              *REC(FACTOR=LOOKUP(D1), PL=Discount)
         *IS 11
              *REC(FACTOR=LOOKUP(D11), PL=Discount)
         *IS 3
              *REC(FACTOR=LOOKUP(D3), PL=Discount)
         *IS 13
              *REC(FACTOR=LOOKUP(D13), PL=Discount)
    *ENDWHEN
    *COMMIT
    Could you let me know what i am doing wrong?
    The calculation i would like to get is: Discount = Revenues(GYP) X DPCx(RATE)
    Also, when I sent the data from the rate application I get the message "ExecuteBaseLogic::invalid application:*APP GYP". I am using a RUNLOGIC in the application RATE with the following code:
    *RUNLOGIC
    *APP GYP
    *LOGIC Decto_en_vtas_pilot
    *ENDRUNLOGIC
    Kind Regards,
    Luisana

  • Using an application built with the iPhone SDK for business

    Hi,
    I've just finished making an application for a university project I am working on, its designed to show the benefits of using mobile technology in businesses. But I didn't totally think this through. After demonstrating this application to them, they've now asked if they can have this software on there devices to test and evaluate it. I had to say that I honestly don't know.
    Is it possible to distribute an application I have made only to those who I choose? More specifically this is an application to be ran on iPod touches, how would I only allow my colleges to install this application?
    I've heard of businesses using iPhone for business, but how exactly do they do it?
    Thanks,
    Si.

    Thanks etresoft,
    I have a Developers account so testing the device on other iPod's/iPhone's shouldn't be a problem then. But what about distribution on a large scale, if they decided to use this for every employee, 1000+, is there a method to do this?
    After researching I have discovered that a business can have an enterprise developers account, would this qualify for installing a private application on 1000+ devices? This will probably never happen, but as this is a uni project, I need to cover all aspects. Including if this is feasibly possible.
    Thanks,
    Si.

  • Err-"You cannot use the application "Terminal" with this version of MacOSX

    I am receiving this error each time I try to launch the terminal application. Additionally the console application will not open. any suggestions?
    The console icon bounces and then disappears.
    Thanks!

    Hi Photosly
    Welcome to Apple Support Communities
    Are you logged into your Admin. Account when launching the Terminal?
    Try opening Console from Macintosh HD>Applications>Utilities again logged into your Admin. Acc.
    Dennis

  • You cannot use the application "Mail" with this version of Mac OS X

    I get the above message when clicking on "Mail" on my backup drive. Could that be because I did not specifically upgrade my backup drive from Tiger to Leopard?
    Hope this is an easy one to answer. Thanks

    yes, most probably that is an old version of Mail - i.e. Tiger - and is not compatible with Leopard. You would need to replace it with the newer Leopard version of Mail
    hope this helps

  • I get the error message: "You cannot use the application "Firefox" with this version of Mac OS X. What now?

    I have Mac OS X 10.4.11.

    Firefox 4 requires at least OS X 10.5. You can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
    Mozilla are working to prevent Mac users with non-compatible systems from getting the notification about Firefox 4, and also not displaying the "Download Firefox 4" button on http://www.mozilla.com

  • "You cannot use the application "Safari" with this version of Mac OS X."

    This little box popped up after I downloaded 10.5.1 update last night. Anyone else? Any ideas? Nothing else changed.

    answer is here:
    http://discussions.apple.com/thread.jspa?messageID=5892563&#5892563

Maybe you are looking for