Please enable JavaScript to view this site.

QPR Knowledge Base 2019.1

Navigation: Developer's Guide > QPR Web Services Foundation > Functions

GetAttributeAsString

Scroll Prev Top Next More

Revision history:

Introduced in QPR 8.0

 

Gets of a single attribute from an object defined in the function call.

 

Synopsis:

 

string GetAttributeAsString(string sessionId, string objectId, string attribute, string options)

 

Return Value:

 

Attribute value as string.

 

Parameters:

 

sessionId: String. ID of an authenticated session.

objectId: String. ID of an object from which the attribute is fetched.

attribute: String. Name of the attribute that is queried. See Supported attributes.

options: String. Additional options for the query.

 

Example Procedure:

 

ServiceClient client = new ServiceClient("WSHttpBinding_IService");

string sessionId = client.Authenticate("qpr", "demo");

String attribute = client.GetAttributeAsString(sessionId, "PG.67890.5343", "description", "");

MessageBox.Show("Element description: " + attribute);

client.Close();