Forum Discussion
Help Needed: Merging Email Lists from Lookup and Security Groups in a Fabric Pipeline
- 1 year ago
Hi,
Thanks for the response. I was finally able to resolve it as follows:
After the web activity that retrieves the members of the security groups, I added a notebook that processes the results and extracts the "mail" field from each member. This allowed me to generate a list of email addresses associated with the security groups.
Then, I added two "Set variable" activities:
The first one assigns the list of emails to a temporary variable inside the forEach loop.
The second one accumulates the emails into an accumulator variable, which allowed me to build the complete list of emails outside the forEach.
This approach enabled me to successfully retrieve all the email addresses from the security groups and use them in the subsequent steps of the pipeline.
Hi liney_marcela ,
Apologies for the delayed response.
Could you please try the following workarounds?
To fix the self-referencing error, create a temporary variable called tempAccumulator and inside the ForEach loop, first assign it the current value of groupEmailsAccumulator, then use tempAccumulator to build the new value by appending the current group’s members with @concat(...), which avoids referencing the variable being set. As for the type mismatch error when using @union, switch to an Append variable activity to build your final array gradually, or if you're stuck using Set variable, wrap the union result in an object like { "value": @union(...) }
If you're still facing challenges, feel free to let us know we’ll be glad to assist you further.
Looking forward to your response.
Best regards,
LakshmiNarayana.
Hi liney_marcela ,
I wanted to follow up and confirm whether you’ve had the opportunity to review the information provided super users . Should you have any questions or require further clarification, please don't hesitate to reach out.
We appreciate your engagement and thank you for being an active part of the community.
Best Regards,
Lakshmi Narayana