getgroupbyname function

Hi,

I have an expression rule used for an assignment of a task.  In this expression rule, I am appending some text at the end of the group and stripping out any characters outside of text and numbers.  Then, I am using the getdirectgroupmemberuserspaging function to retrieve the members of the group.

 

getdirectgroupmemberuserspaging(getgroupbyname(rule!REG_stripCharactersNotAllowedInSmartServices(rule!RCT_getOrgNameByOrgId(pv!certificationDetails.organizationId))&" Emergency Preparedness Plan Contacts"),0,20)

 

I believe the issue is with the getgroupbyname function.  It is returning the group Id + hyphen + organization name.  So, for instance, the getgroupbyname portion of the expression rule below returns:

 

15934 - Company XYZ Emergency Preparedness Plan Contacts (Group)

 

I just want it to return "Company XYZ Emergency Plan Contacts" so that it matches an actual group in our system and then the getdirectgroupmemberuserspaging function will return the members of the group.  Because it returns a group name with the group Id and hyphen, there is no matching group and therefore the entire expression rule returns null.

Did the getgroupbyname function always work this way?  This was working before as far as I know.

 

Regards,

Gary

 

 

15934 - Company XYZ Emergency Preparedness Plan Contacts (Group)

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to garym
    From what I can tell, you're confusing the rendering of the "Group Type" output (displaying group ID & group name) with the actual output (simply a group type object). If the function "getdirectgroupmemberuserspaging" requires an object of Group Type, I would expect the code you showed us to work unless something else is wrong.

    If you want to troubleshoot further, you could also try to see what happens when you call "getdirectgroupmemberuserspaging" while manually passing in an RI of type Group (or maybe just a group ID).
Children