ArcGIS Developers

PortalGroupListModel QML Type

Represents a particular set of groups in a portal. More...

Import Statement: import Esri.ArcGISRuntime 100.11
Since: Esri.ArcGISRuntime 100.0




  • bool contains(PortalGroup portalGroup)
  • void forEach(callback)
  • PortalGroup get(int index)
  • int indexOf(PortalGroup portalGroup)

Detailed Description

This model type is returned by:

The model returns data for the following roles:

accessEnums.PortalAccessThe access level for the group.
adminslist<string>The admin users of the group.
createddateThe date the group was created.
groupDescriptionstringThe description of the group.
groupIdstringThe group's ID.
invitationOnlyboolWhether the group membership is invitation-only.
modifieddateThe date on which the group was last modified.
ownerstringThe username of the owner of the group.
phonestringThe telephone number of the group.
snippetstringThe group summary.
sortFieldEnums.PortalGroupSortFieldThe field that items in the group are sorted by.
sortOrderEnums.PortalQuerySortOrderThe sort order for items in this group.
tagsstringThe user-defined tags that describe the group.
thumbnailUrlurlThe URL of the thumbnail used for the group.
titlestringThe title of the group.
userslist<string>The users of the group.
viewOnlyboolWhether the group membership is view-only.


Access the various groups of a portalItem:

Connections {
    target: portalItem
    function onFetchGroupsStatusChanged() {
        if (portalItem.fetchGroupsStatus !== Enums.TaskStatusCompleted)

        console.log("admin groups:");

        console.log("member groups:");

        console.log("other groups:");


Accessing various roles of the model from within a QML delegate:

Image {
    source: thumbnailUrl // use the thumbnailUrl role of the model
    fillMode: Image.PreserveAspectCrop
    height: parent.height
    width: height

Text {
    text: title // access the title role of the group
    font.bold: true

See also Portal, PortalGroup, PortalItem, PortalQueryParametersForGroups, and PortalQueryResultSetForGroups.

Property Documentation

count : int

Returns the number of objects in the model (read-only).

error : Error

Returns the Error object (read-only).

Signal Documentation


Emitted when the count property of the model changes.

Note: The corresponding handler is onCountChanged.


Signal emitted when the error property changes, which can indicate that an error occurred.

Note: The corresponding handler is onErrorChanged.

portalGroupAdded(int index)

Signal emitted when a PortalGroup is added to the list model.

index is the index of the added PortalGroup.

Note: The corresponding handler is onPortalGroupAdded.

portalGroupRemoved(int index)

Signal emitted when a PortalGroup is removed from the list model.

index is the index of the removed PortalGroup.

Note: The corresponding handler is onPortalGroupRemoved.

Method Documentation

bool contains(PortalGroup portalGroup)

Returns true if the list model contains the specified PortalGroup portalGroup.

void forEach(callback)

Receives a callback function to execute for each portalGroup in the model.

The callback function can take 0 to 3 optional arguments, in order:

Returns undefined if no error occurred, and an error message otherwise.

const error = PortalGroupListModel.forEach(function(element, index, array) {
if (error) {

PortalGroup get(int index)

Returns the PortalGroup at the specified index.

int indexOf(PortalGroup portalGroup)

Returns the index of a specific portal group (portalGroup) from the list model.

This method was introduced in Esri::ArcGISRuntime 100.5..

Feedback on this topic?