Skip To Content ArcGIS for Developers Sign In Dashboard

PortalGroupListModel QML Type

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

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

Properties

Signals

Methods

Detailed Description

This model type is returned by:

The model returns data for the following roles:

RoleTypeDescription
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.

Example:

Access the various groups of a portalItem:

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

        console.log("admin groups:");
        portalItem.adminGroups.forEach(function(group){
            console.log(group.title)
        });

        console.log("member groups:");
        portalItem.memberGroups.forEach(function(group){
            console.log(group.title)
        });

        console.log("other groups:");
        portalItem.otherGroups.forEach(function(group){
            console.log(group.title)
        });
    }
}
portalItem.fetchGroups();

Example:

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

countChanged()

Emitted when the count property of the model changes.

Note: The corresponding handler is onCountChanged.


errorChanged()

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

Note: The corresponding handler is onErrorChanged.


portalGroupAdded(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(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)

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.

var error = PortalGroupListModel.forEach(function(element, index, array) {
    ...
});
if (error) {
    console.error(error.message);
}

PortalGroup get(index)

Returns the PortalGroup at the specified index.


int indexOf(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?