Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
wms_debra Absent Member.
Absent Member.
857 views

Group/User Dependency


Do anyone know how I can create a multi-group field and based on what group is selected populate another field with the Users of that group.
0 Likes
2 Replies
pmthompson1954 Absent Member.
Absent Member.

Re: Group/User Dependency


Q. What kind of field do you want to populate with the Users of the Group?

You can do it (relatively easily) with App script. The field value will be an SBM "CSV" format list, meaning a Comma-separated-values list with COMMA chars at the beginning and end. An empty list is supposed to be ",," (COMMA,COMMA) but can be blank or a single COMMA (just to make life interesting). A field with two group IDs looks like ",123,456,".

You will need to parse on the COMMA, get a single numeric Group ID then query TS_MEMBERS where TS_GROUPID == the numeric group id. There will be one record in TS_MEMBERS for each user in the group so you will need to use an AppRecordList to do the query, then iterate that object using an AppRecord. For each AppRecord, get the TS_USERID field value. Use this to assemble a CSV string of user IDs which you will (eventually) put into your field.

That's assuming you are putting the group members into a multi-user list.
0 Likes
wms_debra Absent Member.
Absent Member.

Re: Group/User Dependency


Hi Paul, I didn't see your response until now. I don't care what type of field it is. I just need to have all the groups in one field and based on the group selection populate another field with only the members of that group. Do you have a sample script that I can use? Appreciate any help.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.