Clarity

  • 1.  Validating the project's fields

    Posted Aug 15, 2017 12:48 AM

    I want to validate the project's fields  using gel/xog such as Project's status,Project's financial status, Resource status and region.

    Does anyone else have anything to suggest?

     

    I tried to pulled up the query and i don't know. How to add the validations based on query filter.

     

    Below codes are my understanding as of now.

     

    select srm.ID,srm.First_Name,invp.IS_PROGRAM,invp.IS_TEMPLATE,inv.CODE,inv.IS_ACTIVE "PROJECT_ACTIVE",inv.STATUS "PROJECT STATUS",
    pac.STATUS "FINANCIAL_STATUS",odf.Z_RGN "REGION",odf.z_lead_comp "LEAD_COMPANY"
    from
    SRM_RESOURCES srm
    JOIN PRTEAM prt ON srm.ID=prt.PRRESOURCEID
    JOIN INV_PROJECTS invp ON invp.PRID=prt.PRID
    JOIN INV_INVESTMENTS inv ON inv.ID=invp.PRID
    JOIN PAC_MNT_PROJECTS pac ON pac.ID=inv.ID
    JOIN ODF_CA_PROJECT odf ON odf.ID=pac.ID
    Where invp.IS_PROGRAM=0
    and invp.IS_TEMPLATE=0
    and inv.IS_ACTIVE=1
    and inv.STATUS=1
    and pac.STATUS='O'
    and odf.Z_RGN=4
    and odf.z_lead_comp in(38,39);

     

    on the above i have added some filters on the query. I need to validate the above code based on that results and build the update query for displaying the status in Custom Table. (Forex.update odf_ca_z_if_history set z_process_flag=2 where code='PR0001')



  • 2.  Re: Validating the project's fields

    Broadcom Employee
    Posted Aug 15, 2017 02:43 PM

    If you are validating project related attributes information includes project financials then no need to include prteam table in your query

     

    Please remove

    SRM_RESOURCES srm
    JOIN PRTEAM prt ON srm.ID=prt.PRRESOURCEID

     

    Thanks

    Senthil



  • 3.  Re: Validating the project's fields

    Posted Aug 16, 2017 02:08 AM

    Hi Senthil,

     

    Thanks for your informations!!!

     

    I missed out 1 point in previous conversations, 

     

    I need to validate resource details as well. Like, whether the resource is active or not. hence i added the resource table in that Query.



  • 4.  Re: Validating the project's fields

    Posted Aug 16, 2017 04:51 PM

    Do    I understand your question correctly: you your query retrieves the records that do not meet your validation criteria and

    then you want to store the data for not matching records to a custom object.

    If that is the question and your query is already retrieving the correct data then you need to write the query results into the custom object already existing with the required fields. The following thread could help you with the XOG part.

    https://communities.ca.com/message/101798519?comthementID=101798519#comment-101798519