Constant-based Search for User Associations: Exploring Alternatives for Effective User Management

Hello everyone,

We are currently facing challenges when it comes to identifying users who are part of Constants of Type "User" or "User or Group". This poses a problem when we need to deactivate someone's account and remove or replace them from all associated groups and constants.

We have successfully obtained the list of group names that a user (e.g., the logged-in user) belongs to using the following code snippet:

a!richTextDisplayField(
    value: {
        a!richTextBulletedList(
            items: {
                a!forEach(
                    items: getgroupsformemberuser(loggedInUser()),
                    expression: group(fv!item, "groupName")
                )
            }
        )
    }
)

However, we still encounter difficulties in identifying users who are part of Constants of Type "User" or "User or Group".

We are considering the use of constant descriptions to improve the search process for these constants. If you have any suggestions or tips on implementing this search based on the constant description, your input would be greatly appreciated.

Additionally, we would like to know if there are any relevant functions, methods, or best practices that can assist us in this situation.

Furthermore, we have an additional question regarding user management: Which approach is better for storing users, in Constants of Type "User" / "User or Group", or in a user Group? We would appreciate gaining a better understanding of the pros and cons associated with each option.

Thank you for your assistance.

  Discussion posts and replies are publicly visible

  • Certified Lead Developer

    Hm ... I consider assigning an individual user to a constant a serious design flaw ...

    How do you do your access management? No active directory?

  • Yes, we have. We use Active Directory (AD) to check user identities, allowing everyone to manage access with their AD accounts. Access levels are determined by existing AD accounts, so individual setup is unnecessary. AD objects are used for role-based access control. Our system regularly updates user information from specific AD groups, eliminating the need for manual user management. This integration simplifies access control without creating new user accounts.

    To address the issue, we are considering gradually replacing the use of the mentioned Constants in the older Appian Apps. They were used to avoid creating too many user Groups in Appian, I assume. These Constants are utilized in various parts of the apps, such as process models and interfaces. However, using Constants of Type "User" or "User or Group" poses a challenge in determining which specific Constants include the Appian User. Currently, we lack a simple way to search and locate these Constants.

    We would appreciate any guidance on relevant functions, methods, or best practices to help us address this situation.

    Additionally, we would like to understand the pros and cons of storing users in Constants of Type "User" / "User or Group" versus using a user Group.

  • Certified Lead Developer
    in reply to muhammedk

    Groups are cheap in Appian and groups are what you want to use.

    Bad design decisions from the past ... we all enjoy them. The only idea I have is, to manually collect all these constants in an expression. Then you can loop on them and search for a user account.

  • Certified Lead Developer
    in reply to muhammedk

    You could try renaming the constants and using the getconstantvaluebyname function community.appian.com/.../content-tools

  • Thank you for the helpful response! How about considering the use of "Decision Tables" in Appian as an alternative for some of the Constants of Type "User" or "User or Group" instead of relying only on Groups? It could potentially decrease the number of Constants in specific situations. Could you kindly share the pros and cons of using Decision Tables for storing users? Additionally, like Constants of Type "User" or "User or Group," Decision Tables also have the limitation of not being searchable. Do you have any advice on relevant functions, methods, or best practices for searching the users used in "Decision Tables"?