Show / Hide Table of Contents

CreateGeneric(String) Method

The name of the table or view on which the new generic will be based.

Creates a new ClarifyGeneric based on the specified table or view name

Syntax

'Declaration

Public Overloads Overridable Function CreateGeneric( _
   ByVal _tableName_ As String _
) As ClarifyGeneric
public virtual ClarifyGeneric CreateGeneric( 
   string _tableName_
)

Parameters

tableName

The name of the table or view on which the new generic will be based.

Return Value

A new ClarifyGeneric based on the specified table or view name

Remarks

NOTE: Generics based on views cannot be updated, modified, or related to other generics, rows, or values.

Example

This example shows how to create a generic from the session (it assumes that the application is already initialized and that a session has been created in the variable 'session'), traverse to children generics and iterate over rows.

// Create a dataset ClarifyDataSet dataSet = new ClarifyDataSet(session);

// Get all cases, activity logs, and contact. ClarifyGeneric gCase = dataSet.CreateGeneric("case");

ClarifyGeneric gAct = gCase.Traverse("case_act2act_entry");

ClarifyGeneric gContact = gCase.Traverse("case_reporter2contact");
  
// Now query the data gCase.Query();
  
// Display return data to the console. First the case, then all
// activity logs then the one contact for the case foreach( ClarifyDataRow caseRow in gCase )
{
    Console.WriteLine("Case ID: {0}", caseRow\["id_number"\]);
    
    // Show each act entry
    foreach( ClarifyDataRow actRow in caseRow.RelatedRows(gAct) )
    {
        Console.WriteLine("  Activity: {0}", actRow\["objid"\]);
    }
    
    // Show each contact
    foreach( ClarifyDataRow conRow in caseRow.RelatedRows(gContact) )
    {
        Console.WriteLine("  Contact: {0} {1}", conRow\["first_name"\], conRow\["last_name"\]);
    }
}

' Create a dataset Dim dataSet As New ClarifyDataSet(session)

' Get all cases, activity logs, and contact. Dim gCase As ClarifyGeneric = dataSet.CreateGeneric("case")

Dim gAct As ClarifyGeneric = gCase.Traverse("case_act2act_entry")

Dim gContact As ClarifyGeneric = gCase.Traverse("case_reporter2contact")
  
' Now query the data gCase.Query()
  
' Display return data to the console. First the case, then all
' activity logs then the one contact for the case For Each caseRow As ClarifyDataRow In gCase

    Console.WriteLine("Case ID: {0}", caseRow("id_number"))
    
    ' Show each act entry
    For Each actRow As ClarifyDataRow In caseRow.RelatedRows(gAct)
        Console.WriteLine("  Activity: {0}", actRow("objid"))
    Next
    
    ' Show each contact
    For Each conRow As ClarifyDataRow In caseRow.RelatedRows(gContact)
        Console.WriteLine("  Contact: {0} {1}", conRow("first_name"), conRow("last_name"))
    Next
Next

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server family

Reference

ClarifyDataSet Class
ClarifyDataSet Members
Overload List

Back to top © 2022 Dovetail Software, Inc. - All rights reserved.
Clarify, Amdocs, and related products and names are copyright and trademark of Amdocs, Inc.
.NET, Visual Studio.NET, C#, Visual Basic and related products are trademark of Microsoft corporation.