so I have been using the a!pickerFieldGroups() which is great and gives me my group name,
however I am trying to get the name and a description.
does anyone have any idea how that would be possible?
thanks,
Kevin
Discussion posts and replies are publicly visible
this is my current code:
{ a!boxLayout( label: "Organization", contents: { a!sideBySideLayout( items: { a!sideBySideItem( item: a!pickerFieldGroups( label: "Organization", labelPosition: "ABOVE", maxSelections: 1, groupFilter: cons!GFIM_POINTS_TO_US_ARMY, value: ri!org&" - "&ri!org, saveInto: {ri!org}, validations: {} ) ), }, style: "STANDARD", marginBelow: "STANDARD" )})}
kevinr0001 You can try using custom picker, and write a rule for suggestFunction which will return Name and Description for groups.
I'm not sure I follow - the group picker does show both the name and description.
Do you mean you want to also save the description? If that's the case, you can get the description using the group() function. Here's a sample:
a!localVariables( local!group, local!groupDescription, { a!pickerFieldGroups( label: "Group Picker", labelPosition: "ABOVE", value: local!group, saveInto: { local!group, a!save( target: local!groupDescription, value: if( /* Checks if no groups are saved; if none, just return an empty list */ or( isnull(local!group), length(local!group) < 1 ), {}, /* Find the description for all groups if there are more than one */ a!forEach( items: local!group, expression: group(fv!item, "description") ) ) ) } ) } )
thank you, this is exactly what I wanted !