Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

user visibility issue

Certified Senior Developer

We display the groups a user belongs to in a read-only grid, and the data appears correctly in the UI. However, when a basic user exports the data using the default record export, the group names are not visible in the exported file.

  Discussion posts and replies are publicly visible

Parents
  •     a!gridField(
                    data: a!recordData(
                      recordType: 'recordType!{SYSTEM_RECORD_TYPE_USER}User',
                      filters: a!queryLogicalExpression(
                        operator: "AND",
                        ignoreFiltersWithEmptyValues: true,
                        logicalExpressions: {
                          a!queryLogicalExpression(
                            operator: "AND",
                            ignoreFiltersWithEmptyValues: true,
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_isServiceAccount}isServiceAccount',
                                operator: "=",
                                value: false
                              ),
                              a!queryFilter(
                                field: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_active}active',
                                operator: "=",
                                value: local!status,
                                applyWhen: a!isNotNullOrEmpty(local!status)
                              )
                            }
                          ),
                          a!queryLogicalExpression(
                            operator: "OR",
                            ignoreFiltersWithEmptyValues: true,
                            filters: {
                              a!queryFilter(
                                field: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_firstAndLastName}firstAndLastName',
                                operator: "includes",
                                value: local!searchText,
                                applyWhen: a!isNotNullOrEmpty(local!searchText)
                              ),
                              a!queryFilter(
                                field: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_email}email',
                                operator: "includes",
                                value: local!searchText,
                                applyWhen: a!isNotNullOrEmpty(local!searchText)
                              )
                            }
                          )
                        }
                      ),
                      fields: {
                        'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_uuid}uuid',
                        'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_active}active',
                        'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username',
                        'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_firstName}firstName',
                        'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_lastName}lastName',
                        'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_email}email',
                        'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_firstAndLastName}firstAndLastName',
                        'recordType!{SYSTEM_RECORD_TYPE_USER}User.relationships.{b091aaa6-27e4-406a-8b2f-1a658699f5eb}employeeRoster'
                      }
                    ),
                    columns: {
                      a!gridColumn(
                        label: "Full Name",
                        sortField: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_firstAndLastName}firstAndLastName',
                        value: fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_firstAndLastName}firstAndLastName']
                      ),
                      a!gridColumn(
                        label: "Email",
                        sortField: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_email}email',
                        value: fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_email}email']
                      ),
                      a!gridColumn(
                        label: "User Group",
                        value: if(
                          toboolean(
                            fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_active}active']
                          ) <> true(),
                          "Deactivated User Account",
                          a!localVariables(
                            local!groupsOfCurrentUser: if(
                              fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username'] = "serviceAccount",
                              null,
                              a!groupsForUser(
                                username: touser(
                                  fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username']
                                )
                              )
                            ),
                            local!directMemeberGroups: a!forEach(
                              items: local!groupsOfCurrentUser,
                              expression: a!localVariables(
                                local!directMembers: a!groupMembers(
                                  group: fv!item,
                                  direct: true,
                                  pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 5000)
                                ).data,
                                if(
                                  and(
                                    not(rule!APN_isEmpty(local!directMembers)),
                                    contains(
                                      touser(local!directMembers),
                                      touser(
                                        fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username']
                                      )
                                    )
                                  ),
                                  togroup(fv!item),
                                  {}
                                )
                              )
                            ),
                            local!groupNamesAll: a!flatten(
                              a!forEach(
                                items: local!directMemeberGroups,
                                expression: if(
                                  rule!IHUB_CheckNullValue(value: fv!item),
                                  "ServiceAcc",
                                  group(fv!item, "groupName")
                                )
                              )
                            ),
                            local!allIhubGroups: a!flatten(
                              index(
                                local!groupNamesAll,
                                wherecontains(
                                  {lower("IHUB"),lower("Otsu")},
                                  lower(
                                    a!forEach(
                                      items: local!groupNamesAll,
                                      expression: left(fv!item, 4)
                                    )
                                  )
                                ),
                                null
                              )
                            ),
                            local!removeNonBusiIhubGroups: remove(
                              local!allIhubGroups,
                              wherecontains(
                                cons!IHUB_TEXT_GROUP_NAMES_TO_BE_REMOVED_FROM_USER_REPORTS,
                                touniformstring(local!allIhubGroups)
                              )
                            ),                
                            joinarray(
                              reject(
                                fn!isnull,
                                local!removeNonBusiIhubGroups
                              ),
                              ", "
                            )
                          )
                        )
                      ),
                      a!gridColumn(
                        label: "License Status",
                        value: if(
                          fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_active}active'],
                          "Active",
                          "Inactive"
                        )
                      ),
                      /*a!gridColumn(*/
                      /*label: "Update Action",*/
                      /*value: a!recordActionField(*/
                      /*actions: a!recordActionItem(*/
                      /*identifier:fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_uuid}uuid'],*/
                      /*action: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.actions.{bfe563cb-239b-488f-bca0-e60998dcd8c2}'*/
                      /*),*/
                      /*style: "TOOLBAR_PRIMARY",*/
                      /*display: "ICON",*/
                      /*showWhen: a!defaultValue(fv!row['recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_active}active'],false())*/
                      /*),*/
                      /*align: "CENTER"*/
                      /*)*/
                      
                    },
                    pageSize: 10,
                    borderStyle: "STANDARD",
                    selectable: true,
                    selectionValue: local!selectedUsers,
                    selectionSaveInto: {
                      local!selectedUsers,
                      a!save(
                        local!selectedRows,
                        append(local!selectedRows, fv!selectedRows)
                      ),
                      a!save(
                        local!selectedRows,
                        difference(local!selectedRows, fv!deselectedRows)
                      )
                    },
                    initialSorts: {
                      a!sortInfo(
                        field: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_uuid}uuid',
                        ascending: false
                      )
                    },
                    showSearchBox: true,
                    showExportButton: true,
                    userFilters: {
                      'recordType!{SYSTEM_RECORD_TYPE_USER}User.filters.{0b983a21-a3a8-4725-843c-52f594a381c9}statusForGrid'
                    },
                    recordActions: a!recordActionItem(
                      action: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.actions.{00380692-8c5f-4b5e-ae32-65833cced2a3}createUser'
                    ),
                    actionsStyle: "TOOLBAR_PRIMARY",
                    refreshAfter: "RECORD_ACTION",
                    refreshOnVarChange: local!refresh,
                    refreshOnReferencedVarChange: true
                  ),

  • Hi  ,

    Usually, the logics we added in the value will evaluate during run time and display the values, but in the export time value may not executed with all local which is configured in the values.

    The recommendations would be converting all the value calculation in the custom record field and configured that field in display as well to export. Also make sure the user has the right permissions to view the group information.

    Note: It would be great if we have the sample exported file, to analyse the issue in detail.

Reply Children
No Data