Using data sources by name

Scripting API enhancements

The InvokeMethod() and LoadFromMethod() APIs have been enhanced to take an explicit data source parameter. If the data source is not passed, then the API uses the default data source or the data source of the collection as usual.

You cannot create a data source from the scripting. However, you can look up the data source that you might want to use from a number of places.

The data sources that have been configured for the portal are available in the context.Datasources API.

The data source associated with a particular collection is available in the Datasource property of the collection. For example: Items.Datasource.

In the case of the multiplexed data source, the collection of multiplexed data sources is available in the UnderlyingDatasources property on the data source. For example: Items.Datasource.UnderlyingDatasources.

When working with the multiplexed data source, sometimes you want to call a method on only one of its component data sources instead of all of them. In this case, you can use the UnderlyingDatasources property to look up the data source that you want to use.

Infor SyteLine-related field display formats

The SLDecimal, SLImage and SLDocument field display formatters use a data source to get additional information from the back office based on their data value to complete their function. In all cases, the data source must be an Infor SyteLine data source, otherwise the formatter will fail.

If an explicit data source has been configured on the FDF, that data source is used. Otherwise, the data source of the record is used. In the case of a multiplexed data source, each record is associated with a single underlying data source, so even though the data source for the collection is a multiplexed data source, each record has its own independent data source that will be used.

If the FDF is used in a header region, so a record and associated data source is not available, and it has not been configured with an explicit data source, it will attempt to use the default data source.

To configure an explicit data source, you state the data source to use by name or alias. You can also use a multiplexed data source, as long as the underlying data source is an Infor SyteLine data source.

<Datasource

Name="datasourceNameOrAlias"

(required) Give the name or alias of the data source to use.

UnderlyingDatasourceProperty="PropertyName"

(required if this is a multiplexed data source) The name of the property that contains the name or alias of the underlying data source to use.

/>

Infor Service Management-related field display formats

The ISMDecimal and ISMDocument field display formatters use a data source to get additional information from the back office based on their data value to complete their function. In all cases, the data source must be an Infor Service Management data source, otherwise the formatter will fail.

If an explicit data source has been configured on the FDF, that data source is used. Otherwise, the data source of the record is used. In the case of a multiplexed data source, each record is associated with a single underlying data source, so even though the data source for the collection is a multiplexed data source, each record has its own independent data source that will be used.

If the FDF is used in a header region, so a record and associated data source is not available, and it has not been configured with an explicit data source, it will attempt to use the default data source.

To configure an explicit data source, you state the data source to use by name or alias. You can also use a multiplexed data source, as long as the underlying data source is an Infor Service Management data source as mentioned above.

<Datasource

Name="datasourceNameOrAlias"

(required) Give the name or alias of the data source to use.

UnderlyingDatasourceProperty="PropertyName"

(required if this is a multiplexed data source) The name of the property that contains the name or alias of the underlying data source to use.

/>