I need help for creating a report in SAP Hybris which essentially would be used for fetching out the names of "Employees" not "Customers" based on the "User Group" they're assigned. For example : X employee has usergroup : "admingroup". Like that I would need all the Employees with the respective usergroups. Could anyone please help me with a flexisearch query for the same to start with ? I would really appreciate that ! Thank you
I am still new to SAP Hybris and I have seen a lot of other reports but wanted to try this out.
You can use the
string_agg()
-method to list up the user groups, it's mentioned here: How to concatenate multiple rows in flexibleSearch query in HybrisIf the method doesn't work you can try to replace it with
group_concat
.You also need to join the
Employee
with thePrincipalGroup
. You can access the employee's user groups with the attributegroups
: