DataStoreExtensions.Describe(string propertyList) Method
.NET Standard 2.x
Returns the property values of the DataStore model. You specify one or more properties as a string, and the Describe
method returns the values of the properties.
Describe
can also evaluate expressions involving values of a particular row and column. When you include Describe's Evaluate
function in the property list, the value of the evaluated expression is included in the reported information.
Currently the Describe
method does not support the UI-related properties in PowerBuilder.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public static string Describe(this IDataStore dataStore, string propertyList);
Parameters
propertyList
System.String
A string whose value is a blank-separated list of properties or Evaluate
functions.
Returns
System.String
Returns a string that includes a value for each property or Evaluate
function. A newline character (~n or \n) separates the value of each item in propertylist
.
If the property list contains an invalid item, Describe
returns an exclamation point (!) for that item and ignores the rest of the property list. Describe
returns a question mark (?) if there is no value for a property.
If the value of propertyList
is null, then the method returns null.
Examples
The following code example demonstrates how to use the Describe
method to get the sorting condition of the model.
using System;
using DWNet.Data;
using PowerScript.Bridge;
namespace Appeon.ApiDoc.DataStoreExtensionsExamples
{
public class DescribeExample
{
private readonly SchoolContext _context;
public DescribeExample(SchoolContext dataContext)
{
// Sets the data context
_context = dataContext;
}
public void Example()
{
// Instantiates a DataStore object with datawindow: D_Department_Course.
DataStore ds = new DataStore("D_Department_Course");
// Gets the sort condition in the model.
string sort = ds.Describe("DataWindow.Table.Sort");
Console.WriteLine($"sort=\"{sort}\"");
/*This code produces the following output:
sort="course_departmentid A course_courseid A"
*/
}
}
}
Example Refer To
Model Class: D_Department_Course
DataWindow File: d_department_course
Applies to
.NET Standard
2.x