15 Replies Latest reply: Jan 23, 2017 1:23 PM by Goran Coco RSS

    Subfield parts via variable in the loop function

    Goran Coco

      Dear community,


      I have a following problem:


      For Each vTab in 'Domain', 'Dataset', 'Fields', 'Files', 'Process'

          vIndex = 1;

          For Each vRole in Subfield(FilteredFields, ',', $(vIndex))

              Left Join (DG_$(vTab))


              %RaciTpID        AS $(vRole),

              RaciName         AS $(vRole)Name,

              RaciEmail        AS $(vRole)Email,

              RaciShortName    AS $(vRole)ShortName

          Resident DG_RACI_temp;


          vIndex = $(vIndex)+1;


      Now, the point is: I have entities that go in vTab variable and each entity can have one to all of the Roles (Responsible, Accountable, Owner...). RACI table is the lookup table that contains the list of people and any of these people can have one to all roles in one to all entities. I Concatinated all possible fields for all entities in a fields called Domain/Dataset/...FilteredFields. They look like this:

      DomainFilteredFields = 'DomainAccountable,DomainOwner,DomainResponsible'

      DatasetFilteredFields = 'DatasetAccountable,DatasetControl,DatasetInformed,DatasetResponsible,DatasetSupport'

      ProcessFilteredFields = 'ProcessAccountable,ProcessControl,ProcessInformed,ProcessOwner,ProcessResponsible'


      Now I want to left join the data (Name, Email, Short name) to Domain/Dataset... for these people from RACI table.

      I'm not getting any errors and it looks like the loop just goes through.

      Any suggestions on what I could be doing wrong?

      Thank you in advance.