PortalGroupListModel QML Type

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

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

Properties

Signals

Methods

  • bool contains(PortalGroup portalGroup)
  • error 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:

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


itemAdded(int index)

Signal emitted when an item is added to the list model.

index is the index of the added item

Note: The corresponding handler is onItemAdded.

This signal was introduced in Esri.ArcGISRuntime 100.15.


itemRemoved(int index)

Signal emitted when an item is removed from the list model.

index is the index of the removed item.

Note: The corresponding handler is onItemRemoved.

This signal was introduced in Esri.ArcGISRuntime 100.15.


Method Documentation

bool contains(PortalGroup portalGroup)

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


error 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) {
    console.error(error.message);
}

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


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.