Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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))
LOAD
%RaciTpID AS $(vRole),
RaciName AS $(vRole)Name,
RaciEmail AS $(vRole)Email,
RaciShortName AS $(vRole)ShortName
Resident DG_RACI_temp;
Next;
vIndex = $(vIndex)+1;
Next;
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.
May be like attached
It looks like vRole is not getting any values because the fields that are left joined are named:
And all entities get the same resault.
It might be helpful if you can share a sample to look at this. Difficult to see what the issue might be without getting to run the script. On you own, you can try to run this in debug mode and/or add trace statement to see the variables step by step.
In what table does the field FilteredFields reside?
-Rob
Aren't you resetting vIndex to 1 on each vTab loop? Does it need to be above the 'inner' Next command for vRole?
flipside
Yes, I saw it imediately but still, when I changed the code it works the same way.
For Each vTab in 'Domain', 'Dataset', 'Fields', 'Files', 'Process'
vIndex = 1;
For Each vRole in Subfield(FilteredFields, ',', $(vIndex))
Left Join (DG_$(vTab))
LOAD
%RaciTpID AS $(vRole),
RaciName AS $(vRole)Name,
RaciEmail AS $(vRole)Email,
RaciShortName AS $(vRole)ShortName
Resident DG_RACI_temp;
vIndex = $(vIndex)+1;
Next;
Next;
FilteredFields is residing within each entity and it gets a name approriately:
It might need you to upload an example. How exactly are you storing the possible fields you reference as FilteredFields? If you are putting them into separate variables you could call them in this way ...
Set DomainFilteredFields = 'DomainAccountable,DomainOwner,DomainResponsible';
Set DatasetFilteredFields = 'DatasetAccountable,DatasetControl,DatasetInformed,DatasetResponsible,DatasetSupport';
Set ProcessFilteredFields = 'ProcessAccountable,ProcessControl,ProcessInformed,ProcessOwner,ProcessResponsible';
For Each vTab in 'Domain', 'Dataset', 'Process'
vIndex = 1;
For Each vRole in Subfield($(vTab)FilteredFields, ',', $(vIndex))
... but you've mentioned fields.
Here's an example of the problem.
Domain and Dataset contain ID-s of the corresponding RACI people.
Why not use a Mapping load here?