Using a LOV for the Start of a Tree - Pblms using LOV value for Start SQL

I'm trying out my first APEX Tree using P20 and am having problems with it. The data structure is I have a clients table, an users table, a plans table and a union table (plan_users) that shows which users for a client are working on plans. An user belongs to a client and can be assigned to plans (plan_users).
client_id (key to clients table and part of the composite key for users, plans and plan_users) is available as an application item which I can reference as :FOCUS_CLIENT_ID.
I created several LOV's in the Shared Components. The PLANS_LOV returns all plans defined for the :FOCUS_CLIENT_ID. I've referenced this PLANS_LOV in the P20_ROOT_TREE which is setup to display the list of Plans for the Client as a SELECT LIST WITH SUBMIT. That seems to work and I can select the Plan.
I then modified the SOURCE for the P20_ROOT_TREE to add a select statement to take the PLANS_ID selected in the LOV and use it in a Select to bring up the owner of the plan as the starting user for the tree. This is where I get an error when executing the SOURCE select statement which looks like this:
select p.user_id id, p.plan_owner_id pid, u.user_lname name, null link
from plan_users p, users u
where p.client_id = :FOCUS_PLAN_ID and p.PLAN_ID = :PLANS_LOV
and p.user_id = p.plan_owner_id
and u.client_id = :FOCUS_PLAN_ID and u.user_id = p.user_id
I'm guessing that the problem is what I'm referencing as :PLANS_LOV in the statement below. However I cannot find any information on how to reference the returned value from the PLANS_LOV for Page 20 so I've tried this.
If this works right, then I want the user to select a PLAN from the LOV box and then see a tree displayed with all USERS hierarchically displayed beneath the Plan Owner. There may be multiple levels of users display under the Plan Owner.
Here's the DEBUG page error I get. The number 4 is the correct Plan # I want to select Users for. The title on the page is "Available Plans". - Select Plan - is the default Null Value and Test Plan One is the Plan (#4) that I selected.
Item: P20_TREE_ROOT COMBOBOX_WITH_SUBMIT
Available Plans
-Select Plan -Test Plan One
[javascript:popupURL('f?p=4000:371:1020131294804981::::P371_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:1096326828951548,101,20');|Edit]Warning: Tree root ID "4" not found.
0.05: Computation point: AFTER_BOX_BODY 0.05:
Processing point: AFTER_BOX_BODY
The query I'm using for populating the rest of the tree after the START is this statement below, but I don't think I'm getting to this point yet.
select p.user_id id, p.plan_owner_id pid, u.user_lname name, null link, null a1, null a2
from plan_users p, users u
where p.client_id = :FOCUS_CLIENT_ID
and u.client_id = :focus_client_id
and u.user_id = p.client_id
order by name
I haven't been able to find any examples of someone using a LOV as part of the START definition for a Tree. All of the examples I've seen use a fixed value (i.e. 1).
Anyone have some ideas?
Thanks!
Rob

Hi,
Try something like:
select p.user_id id, p.plan_owner_id pid, u.user_lname name, null link, null a1, null a2
from plan_users p, users u
where p.client_id = :FOCUS_CLIENT_ID
and u.client_id = :focus_client_id
and u.user_id = p.client_id
START WITH :FIRST_USER_ID
CONNECT BY PRIOR p.user_id = p.plan_owner_id
order by name:FIRST_USER_ID should be computed to be the first p.user_id value that matches the filter. Ideally, the p.plan_owner_id value should be null for this user as this user should identify the top of the tree. As an example, the following, using the EMP table, will allow you to display a tree with any manager as the root:
SELECT
EMPNO ID,
ENAME NAME,
CASE WHEN EMPNO = :P1_EMPNO THEN NULL ELSE MGR END PID,
null LINK,
null a1,
null a2
FROM EMP
START WITH EMPNO = :P1_EMPNO
CONNECT BY PRIOR EMPNO = MGRAndy

Similar Messages

  • Firefox.exe has encountered a problem and needs to close. We are sorry for the inconvenience. I have been using firefox for years. I installed the latest version of Firefox. It worked fine for several days. Now I get the above message each time I try to s

    firefox.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
    I have been using firefox for years. I installed the latest version of Firefox. It worked fine for several days. Now I get the above message each time I try to start Firefox, even in safe mode. i have checked with latest antivirus softwere also.. i didn't find any thing suspicious.
    == This happened ==
    Every time Firefox opened
    == after loading firefox 3.6.6 ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

    I was having this problem few days ago,and I have fixed.Try this steps-If you have AVG antivirus so go on firefox>Tools>Add On and Disable AVG safe search and AVG tool bars too.Then restart computer.

  • HT2534 i want to set up my apple id but it ask for the gift card but i dont use them

    I want to set up my Apple ID for my phone but it ask for the Gift Card but I dont use them ? what do I do ?

    If you are trying to create an Apple ID without using a credit card, you have to follow the directions in the article you were reading (http://support.apple.com/kb/HT2534) exactly.  Note that you have to start by downloading and installing any free app, then create the ID.  You shouldn't be asked for a Gift Card to create the ID.

  • I have an iPhone 6.  For the first two weeks my bluetooth worked fine but then started having issues.  Now, although it shows that it is connected to Bluetooth, I can't hear any of the calls.  The radio continues to play.  Please help!

    I have an iPhone 6.  For the first two weeks my bluetooth worked fine but then started having issues.  Now, although it shows that it is connected to Bluetooth, I can't hear any of the calls.  The radio continues to play.  Please help!

    Hello there, Srushevics.
    It sounds like you may be having issues with the connectivity of your iPhone with the Bluetooth in your vehicle. The following Knowledge Base article offers up some great steps for troubleshooting that Bluetooth connectivity with your iOS device:
    If you can’t use a Bluetooth accessory or car kit
    To resolve the issue, you'll need to first sign in to iCloud and review your devices:
    Sign in to iCloud on your iOS devices and Macs with OS X Yosemite (available this fall).
    On one of your devices, tap Settings > Bluetooth and look under My Devices. You'll see all devices that are connected to Bluetooth, but make sure that you see your Apple devices that are signed in to iCloud and are using iOS 8 or OS X Yosemite.
    Sign out of your iCloud account from any devices that you don't want to use. To sign out of iCloud on an iOS device, tap Settings > iCloud > Sign Out.
    Then, remove any inactive devices from iCloud:
    Sign in to iCloud.com.
    Select Find My iPhone.
    Select any devices that aren't active anymore.
    Wait for Find My iPhone to stop trying to find the inactive device.
    You should see the option to remove this device from your account. Select it to remove the device.
    After following the steps above, restart the device with the issue. Then try to use it with your Bluetooth accessory.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • While running my app I get the below error  - have different Class objects for the type javax/servlet/http/HttpServletRequest used in the signature

    I am running ATG[10.1.2] app on Jboss [EAP 5.1.0 GA] I am able to open dyn/admin however when I start my app I get the below error
    java.lang.LinkageError: loader constraint violation: when resolving method "atg.servlet.ServletUtil.setSessionConfNumCacheRequest(Ljavax/servlet/http/HttpServletRequest;)Ljavax/servlet/http/HttpServletRequest;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, atg/filter/dspjsp/PageFilter, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, atg/servlet/ServletUtil, have different Class objects for the type javax/servlet/http/HttpServletRequest used in the signature
      at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at atg.servlet.ForwardFilter.doFilter(ForwardFilter.java:263)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at atg.servlet.ErrorFilter.doFilter(ErrorFilter.java:279)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:446)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
      at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
      at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342)
      at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:680)
    11:22:47,413 ERROR [[localhost]] Exception Processing ErrorPage[errorCode=500, location=/global/errorPage500.jsp]

    The supported JBoss version for 10.1.2 is JBoss EAP 5.1.2 but I don't think that your issue is caused because of this. Your issue is more of an environmental thing as you are probably getting two different versions getting loaded of class javax.servlet.http.HttpServletRequest and so correspondingly two different Class objects as the error shows. One reason for this could be if you include any server-specific libraries (in present case the Servlet API JAR which contains the class javax.servlet.http.HttpServletRequest) of a different version in the /WEB-INF/lib of your web application. Try removing it from there if so and see if that helps.

  • Hi,  If I have 1 license for creative cloud, will it possible to install in 2 computers (1 laptop and 1 desktop)?  When I am in the office I can use desktop and at home I can use laptop? At the same time I will be using only one devise. Will that be possi

    Hi,  If I have 1 license for creative cloud, will it possible to install in 2 computers (1 laptop and 1 desktop)?  When I am in the office I can use desktop and at home I can use laptop? At the same time I will be using only one devise. Will that be possible?  Thanks

    Yes. Yes. Yes.
    Mylenium

  • I have ad Apple ID on my iPad , when I use the apple on my iPhone for the first time, I put in my Apple ID for the iPad, didn't work. Need to create a new one. Why? How can I just use my iPad ID on my iPhone?

    I have ad Apple ID on my iPad , when I use the apple on my iPhone for the first time, I put in my Apple ID for the iPad, didn't work. Need to create a new one. Why? How can I just use my iPad ID on my iPhone?

    Hi kamfong,
    Went to Settings where?
    If you want to use your exisiting Apple ID on your iPad, you need to:
    1.     Go to Settings>iTunes & App Store and sign out the new ID, and then sign on the old one
    2.     Go to Settings>iCloud, scroll to the bottom and delete the iCloud account, and the sign back onto iCloud using the old ID
    You still have not indindated why you are saying that using your old ID originally "didn't work". What do you mean by that? Did you get some sort of error when you tried to sign on with your exisiting Apple ID?
    Cheers,
    GB

  • How do I have itunes use/detect my external hard drive and place music on the external drive from the itunes store? There are no music files on my pc yet.  I will like to do this after installing itunes 11 on my pc for the first time. I am using windows 7

    How do I have itunes use/detect my external hard drive and place music on the external drive from the itunes store? There are no music files on my pc yet.  I will like to do this after installing itunes 11 on my pc for the first time. I am using windows 7.  HP computer intel Dual Core.  Thanks for any help!

    Hey idw3,
    Welcome to Apple Support Communities, and thanks for the question. Follow the instructions on this article to move your iTunes Media folder to an external hard drive:
    iTunes for Windows: Moving your iTunes Media folder
    http://support.apple.com/kb/HT1364
    Regards,
    David

  • One of my friend stole my iphone 5 and he knows my password for the phone but he's not using wifi or the sim network cause he knows that I enabled find my iphone and I wanna lock it or burn the phone he is using my pictures

    one of my friend stole my iphone 5 and he knows my password for the phone but he's not using wifi or the sim network cause he knows that I enabled find my iphone and I wanna lock it or burn the phone he is using my pictures and he has shared most of my pictures and the find my phone says it will erase the phone once it will be contact to the internet
    what about if he didn't? what to do pls I need to lock the phone as soon as possible am living in saudi arabia and we dont have apple store here to support me I need to contact anyone in apple store so I can give him the serial numbere and IMEI so they lock the phone with out waiting him to contact to the internet
    I made a report but the problem is it was stolen from of my best friends and I dont know which one we were 4 persons in my house so I dont know which one exactly but it seems I was unlucky to chose them as best friends and trusted them for 2 years and now he's shairing my privte pictures which has dameged my life and if the goverment saw my pictures they will but me in jail for those pictures which is noraml gay pictures but our country difficutl pls any one help me

    What To Do If Your iDevice Is Lost Or Stolen
    If you activated Find My Phone before it was lost or stolen, you can track it only if Wi-Fi is enabled on the device. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. What to do if your iOS device is lost or stolen
      6. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      7. Find My iPhone
      8. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • Has anyone tried to trade in the their iphone5 for the gift card that can be used to buy iphone6?

    Has anyone tried to trade in the their iphone5 for the gift card that can be used to buy iphone6?

        csa3, I want to make sure you are able to take advantage of this offer. Have you submitted a Preorder for the iPhone 6? If so, you can submit your appraisal before September 30, 2014 using the following link: http://bit.ly/GGnDDC
    AndreaS_VZW
    Follow us on Twitter @VZWSupport

  • HT5621 I have 14 cent on my apple account and cannot leave the Irish apple store for the Canadian store,how do I use this 14 cent or delete it from my account?

    I have 14 cent on my apple account and cannot leave the Irish apple store for the Canadian store,how do I use this 14 cent or delete it from my account?

    Greg the king hyland wrote:
    ... ,how do I use this 14 cent or delete it from my account?
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • I copied several MOV files to a CD. When I play them from the CD the video is fine but the audio works fine for the first few seconds then stops (using Qicktime Player 7.7.1.  Everything works fine if I use VLC Media Player. Does anyone have any idea why?

    I copied several MOV files to a CD. When I play them from the CD the video is fine but the audio works fine for the first few seconds then stops (using Qicktime Player 7.7.1.  Everything works fine if I use VLC Media Player. Does anyone have any idea why?

    My purpose for copying to a CD or DVD is so that I can make copies and send to friends and relatives. What is the best way to get these files on a CD/DVD with the right codecs?
    The easiest thing to do is to simply tell your friends and relatives to copy the files to their local hard drive before playing them. Your basic problem is that data discs have a limited real time transfer rate. Since you say VLC plays the files fine, I might suspect its player is likely buffering the data while the QT 7 Player is not.
    Data discs made for playback directly from the CD or DVD are normally encoded using MPEG-4/AVC (H.264) video with AAC audio. This is a modern codec which has specific settings to re-package the data (i.e., must be encoded using the multipass option and then select the "optimize for CD/DVD" option).

  • For the Attribute Movement type(BWA) we use Value " 201" and not "101" why?

    Hello Experts,
    We are in SRM 7.0 classic scenario,
    For the Attribute Movement type(BWA) we use Value " 201" and not "101" and provide the Source syst(backend R/3)
    Can you all plz help me understand what is the difference if use value "101" for the  Attribute Movement type(BWA)
    Also,can you all plz help me understand if we shd use value "101" or "201" for the  Attribute Movement type(BWA) and under what scenario.
    Any pointers will be highly appreciated.
    Thanks & Regards,
    RKS

    Hi,
    Movment type " 201 maintained for the Classic scenario only.
    It is necessary to maintain the attribute if the default material group for a given user (or) sit is set to a backend logical system. The EBP system knows that if the user is set for backend procurement ,that there might be a possibility for a reservation to be generated therefore it checks to see that a value for this attribute is  maintained. The BWA value should be defined  for the  as 201 preceeded by the logical system and a backslash.
    101 should not be used. This isfor the Good receipt.
    In the extended classic scenario when you do the confirmations in SRM the movement type 101 will be created in the
    backend system (R/3 or ECC6.0)
    Regards
    Ganesh Kumar .G

  • Can I convert the optical output to analog for a zone 2 audio? I would continue using the HDMI for the main zone. Can I use both of these simultaneously? Zone 2 only supports analog on this receiver.

    Can I convert the optical output to analog via a converter for  zone 2 audio? I would continue using the HDMI for the main zone. Can I use both of these simultaneously? Zone 2 only supports analog on this receiver.

    These will probably help.
    [http://www.jsresources.org/examples/audio_conversion.html]

  • Tried to update ipad2 for the first time. now can´t use the ipad saying i need to turn off `find me`in icloud. HELP

    tried to update ipad2 for the first time. now can`t use ipad and it is saying i need to turn off `find me`in icloud. HELP

    You can access iCloud.com on a computer to turn it off.
    http://support.apple.com/kb/PH2702
    More >  http://support.apple.com/kb/HT5818

Maybe you are looking for

  • Moving LR files from one external drive to another

    How do I move LR image files from one external drive to another external drive?

  • Collapsible Panel Group - automatic close/open?

    Is there a way to set it so the Spry Collapsible Panel Group automatically closes an open panel when you select to open another one? Thank you.

  • Exception when loading Creator project in Netbeans 5.5 Visual Pack

    java.lang.IllegalArgumentException: Project XXXXX is not open and cannot be set as main.      at org.netbeans.modules.project.ui.OpenProjectList.setMainProject(OpenProjectList.java:415)      at org.netbeans.modules.project.ui.actions.OpenProject.acti

  • SRM 5.0 Delete product from COMM_PRODUCT

    Hi, I want to delete a product from SRM that is replicated from ECC, when I run COM_PRODUCT_DELETE_SINGLE I am getting error message ' DELETION WITHOUT ARCHIVING IS NOT ALLOWED IN PRODUCTIVE ENVIRONMENT'. Can't I delete product without archiving? Can

  • Resize numeric controls

    If I RIGHT CLICK on a Numeric COntrol and select 'Properties', the appearance tab show's the 'SIZE' as Height=23 & Width= 78. However, the Height is "grayed Out" and I cannot change it. I have investigated the "Custom" approach will does allow me to