This method sends a “static” list to the centralized static list store.
To send the static list to a client form or application, you must first populate the list with one or more items by using the Add() method. The SendStatic method is used with the Glb.ClientManager of the Client Framework.
Syntax
Glb.ClientManager::SendStatic(<list> : attribute, [Name : stringExpression]) : void
Parameters
The parameters for SendStatic method are:
list
Name
list
An attribute that is an instance of a list.
This can be a list attribute (Kind=‘List Attribute’) or an attribute in which the Template property is set to a List type.
Name
The name of the list in the client form or application to be populated.
This is an optional parameter. If the name of the list is not mentioned, the list is sent with the name, <OwnerName>.<ListAttributeName>, where ListAttributeName is the name of the list attribute that instantiates the list.
Description
This method sends a “static” list to the centralized static list store. You must first populate the list attribute with one or more items by using the Add() method. The SendStatic method is used with the Glb.ClientManager built-in class of the Client Framework.
The static list is populated from the host application (from the static list store) when the user interface containing the specified list is accessed for the first time by a particular user. The list persists in the client application for the duration of the session. If the list is updated on the host (by another SendStatic() method call), a new list is populated when the new session is started by the client application.
Example
This example shows how to populate a List attribute and then send that list to the centralized static list store on the runtime host by using the SendStatic() method.
ProductItem is a class that defines the structure of each list item. Products is a List Attribute; it represents the actual list. A ForEach loop reads through the Prod table, and for each record, the loop assigns values to ProductItem and then adds that item to the Products list attribute. Then, the fully populated Products list is sent to the static list store on the runtime host through the SendStatic() method:
ForEach Prod in Prod ProductItem.Stockbal = Prod.Stockbal Products.Add(ProductItem) : Adds an item to the Products list End Glb.ClientManager.SendStatic(Products) : Sends Products list to the host
The SendDynamic and the SendStatic methods should be invoked only after populating the list with all the list items.
Note: The SendDynamic or the SendStatic methods should not be invoked multiple times for a single transaction, as the second call overrides the first call. That is, if you modify the list and invoke the SendDynamic or the SendStatic method again the latest change made to the list is sent to the client form or application.