addParameter method: DataSource class
Syntax
addParameter(DSparam_ID, Value)
Description
Use this method to create a DataSourceParameter object with the given ID and value.
Parameters
| Parameter | Description |
|---|---|
|
DSparam_ID |
Specifies the ID of the data source parameter as a string. |
|
Value |
Specifies the value of the data source parameter as a string. |
Returns
A DataSourceParameter object if successful, false otherwise.
Example
import PTFP_FEED:FeedFactory;
import PTFP_FEED:DataSource:DataSource;
import PTFP_FEED:DataSource:DataSourceParameter;
import PTFP_FEED:UTILITY:Utility;
Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory();
Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒
getDataSource("DS_ID");
Local PTFP_FEED:DataSource:DataSourceParameter &thisDSP;
If (&thisDS <> Null) Then
Local PTFP_FEED:UTILITY:Utility &utility = &thisDS.Utility;
&thisDSP = &thisDS.addParameter(&utility.DSPARAMETER_MAXROW, "0");
If (&thisDSP <> Null) Then
&thisDSP.Name = &thisDSP.ID;
&thisDSP.Description = "Description";
&thisDSP.FieldType = &utility.FIELDTYPE_NUMBER;
&thisDSP.DefaultValue = "10";
&thisDSP.Value = &thisDSP.DefaultValue;
&thisDSP.Required = True;
End-If;
End-If;