Clarity

  • 1.  Dynamic Dependent lookup with Browse only Option

    Posted Mar 31, 2015 12:44 AM

    Hi,

    I have a page on which i wan to select the project from one lookup and task from another dynamic dependent multivalued lookup.

    Only tasks which are not milestones, not phase, and belongs to the project selected in first lookup.

    for the task selction teh lookup should not show those tasks which are already selected.

     

    SELECT @SELECT:task.prid:TaskID@,

    @SELECT:task.prname:Task_name@,

    @SELECT:task.PREXTERNALID:ExternalID@,

    @SELECT:to_char(task.prstart, 'MM/DD/YY'):StartDate@,

    @SELECT:to_char(task.prfinish, 'MM/DD/YY'):EndDate@,

    @SELECT:DECODE (task.prstatus, '0', 'Not Started', '1', 'Started', '2', 'Completed'):Status@,

    @SELECT:PRJ_GET_TASK_FULL_NAME_FCT(task.prid, task.prprojectid):task_path@

    FROM  

    prtask task

    WHERE task.prismilestone = 0

    and task.pristask=1 and

    @FILTER@

    and (@where:param:user_def:integer:Project_Id@ = task.prprojectid OR @where:param:user_def:integer:Project_Id@ IS NULL)

    @BROWSE-ONLY:

    And (task.prid not in(select mul.value from ODF_MULTI_VALUED_LOOKUPS mul,odf_ca_z_subsidytest ***

    where mul.attribute = 'z_task' and mul.pk_id=***.id

    and @where:param:user_def:string:Association_id@ = ***.code))

    :BROWSE-ONLY@

     

    I am able to perform all of these except the tasks does not appear on the create, edit page after save, they disapear...I am able to see them on teh list view though.



  • 2.  Re: Dynamic Dependent lookup with Browse only Option

    Posted Mar 31, 2015 09:26 AM

    try moving the parameter reference inside the @browse-only block, like this:

    SELECT

          @SELECT:task.prid:TaskID@

        , @SELECT:task.prname:Task_name@

        , @SELECT:task.PREXTERNALID:ExternalID@

        , @SELECT:to_char(task.prstart, 'MM/DD/YY'):StartDate@

        , @SELECT:to_char(task.prfinish, 'MM/DD/YY'):EndDate@

        , @SELECT:DECODE (task.prstatus, '0', 'Not Started', '1', 'Started', '2', 'Completed'):Status@

        , @SELECT:PRJ_GET_TASK_FULL_NAME_FCT(task.prid, task.prprojectid):task_path@

    FROM prtask task

    WHERE task.prismilestone = 0

    and task.pristask=1

    and @FILTER@

    @BROWSE-ONLY:

        and (@where:param:user_def:integer:Project_Id@ = task.prprojectid OR @where:param:user_def:integer:Project_Id@ IS NULL)

        And (task.prid not in(select mul.value from ODF_MULTI_VALUED_LOOKUPS mul,odf_ca_z_subsidytest ***

        where mul.attribute = 'z_task' and mul.pk_id=***.id

        and @where:param:user_def:string:Association_id@ = ***.code))

    :BROWSE-ONLY@



  • 3.  Re: Dynamic Dependent lookup with Browse only Option

    Posted Apr 01, 2015 01:20 AM

    I had tried this, but this does not work.

    The section within Browse only should be executed only when I click to add new values, which is working fine but i think it's being executed during the saving as well hence it does not show the values becasuse as per the query it shoud show only shows values hwich are not selected at the instance.



  • 4.  Re: Dynamic Dependent lookup with Browse only Option

    Posted Apr 02, 2015 12:26 AM

    Mansriva, don't know if this is related, but please check this thread to see if you are being tripped up by the population (or sometimes lack thereof) of the various parameters (ids) for project id vs other ids as per this thread? May help may not: Technique sought  for linking an NSQL parameter to a portlet or portlet pa , https://communities.ca.com/message/2284248#2284248