IMobilePublishRubricator.IsEmptyFactors

Fore Syntax

IsEmptyFactors: Boolean;

Fore.NET Syntax

IsEmptyFactors(): boolean;

Description

The IsEmptyFactors method returns whether the elements of the time series database are selected.

Comments

Available values:

Fore Example

Executing the example requires that the repository contains a mobile application with the MA_PUB identifier. Add links to the Metabase, Mobile system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Mobile: IMobileApplication;
    Publicator: IMobileApplicationPublicator;
    MaPubObs: IMobileApplicationPublishObjects;
    i: Integer;
    MaPubObj: IMobileApplicationPublishObject;
    PubObj: IMobilePublishObject;
    RubPubObj: IMobilePublishRubricator;
    s: String;
    Atts: Array Of Integer;
    j: Integer;
Begin
    mb := MetabaseClass.Active;
    // Get mobile application 
    Mobile := mb.ItemById("MA_PUB").Bind As IMobileApplication;
    // Create a mobile application publisher 
    Publicator := Mobile.CreatePublicator;
    // Get mobile application objects
    MaPubObs := Publicator.Items;
    For i := 0 To MaPubObs.Count - 1 Do
        MaPubObj := MaPubObs.Item(i);
        // Select among objects of the time series database
        If MaPubObj.Type = MobilePublishObjectType.Rubricator Then
            PubObj := MaPubObj.PublishObject;
            RubPubObj := PubObj As IMobilePublishRubricator;
            // Display data on time series database in the console window
            s := PubObj.Object.Name + " (" + PubObj.Object.Id + ")";
            Debug.WriteLine("Object: " + s);
            // Check if selection is set
            If RubPubObj.IsEmptyFactors Then // If selection is not set
                // Select all elements
                RubPubObj.SelectAllFactors;
            Else // If selection is set
                // Load selection and display it in the console window
                Atts := RubPubObj.LoadFactors;
                Debug.WriteLine("  Selection element keys: " + s);
                Debug.Indent;
                For j := 0 To Atts.Length - 1 Do
                    Debug.WriteLine(Atts[j]);
                End For;
                Debug.Unindent;
            End If;
        End If;
    End For;
End Sub UserProc;

Example execution result: the console window displays information on the selection of the time series database elements from the mobile application.

Fore.NET Example

Executing the example requires that the repository contains a mobile application with the MA_PUB identifier.

Imports Prognoz.Platform.Interop.Mobile;

[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Mobile: IMobileApplication;
    Publicator: IMobileApplicationPublicator;
    MaPubObs: IMobileApplicationPublishObjects;
    i: Integer;
    MaPubObj: IMobileApplicationPublishObject;
    PubObj: IMobilePublishObject;
    RubPubObj: IMobilePublishRubricator;
    s: String;
    Atts: System.Array;
    j: Integer;
Begin
    mb := Params.Metabase;
    // Get mobile application 
    Mobile := mb.ItemById["MA_PUB"].Bind() As IMobileApplication;
    // Create a mobile application publisher 
    Publicator := Mobile.CreatePublicator();
    // Get mobile application objects
    MaPubObs := Publicator.Items;
    For i := 0 To MaPubObs.Count - 1 Do
        MaPubObj := MaPubObs.Item[i];
        // Choose among objects of the time series database
        If MaPubObj.Type = MobilePublishObjectType.mpotRubricator Then
            PubObj := MaPubObj.PublishObject;
            RubPubObj := PubObj As IMobilePublishRubricator;
            // Display data on time series database in the console window
            s := PubObj.Object.Name + " (" + PubObj.Object.Id + ")";
            System.Diagnostics.Debug.WriteLine("Object: " + s).
            // Check if selection is set
            If RubPubObj.IsEmptyFactors Then // If selection is not set
                // Select all elements
                RubPubObj.SelectAllFactors();
            Else // If selection is set
                // Load selection and display it in the console window            
                Atts := RubPubObj.LoadFactors();
                System.Diagnostics.Debug.WriteLine("  Selection element keys: " + s).
                System.Diagnostics.Debug.Indent();
                For j := 0 To Atts.Length - 1 Do
                    System.Diagnostics.Debug.WriteLine(Atts[j]);
                End For;
                System.Diagnostics.Debug.Unindent();
            End If;
        End If;
    End For;
End Sub;

Example execution result: the console window displays information on the selection of the time series database elements from the mobile application.

See also:

IMobilePublishRubricator