Child pages
    • Running the ANA_Populate_Enums procedure

    Unsupported content


    This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

    Skip to end of metadata
    Go to start of metadata

    Run the ANA_Populate_Enums procedure to update the enumerated values in the ANA_ALL_ENUM_VALUES table. This database procedure reads the enumerated field values from the BMC Remedy AR System ARSCHEMA table and populates the ANA_ALL_ENUM_VALUES table.

    If your application uses an overlay form, use the following command at the SQL prompt to run the program:

    • (Microsoft SQL Server) SQL>EXECUTE ARSystem.dbo.ANA_POPULATE_ENUMS

    If your application does not use an overlay form, use the following commands:


    Following is the pseudo code for the ANA_Populated_Enums procedure:

    Procedure  ANA_Populate_Enums()
      Read the data  from the arschema  table
    For each  table row {
    		        While for each <ARForm> Query  arschema table and get SchemId and overlayProp
    		If (overlayProp=0 OR overlayProp=4)    // It is consider as Base Form
    		 {     baseSchemaId= SchemId; }
    	              Else {   Query Field_Enum_Values table to get all the enum ids for a given form (base overlayschemaId)
    		   overlaySchemaId= SchemId;  }
    		For each <SchemaId> (base and overlay) get all the enumerated FieldIds  from enum_value_fields & Field
    	Join condition: field.fieldId = field_enum.fieldId and field.schemaId = field_enum.schemaId
    		} // End of For each <SchemaId>
    	For each < fieldId>
    		  if (fOverlayProp!=0) then  SchemaId= overlaySchemaId else SchemaId= baseSchemaId
    			 While for each < SchemaId >  get the VUI ID from vui table
    			  Query field_dispprop table for combination of <vuid> <SchemaId><fieldId>
                                    	    If (propShort is NULL) then strValue=propLong ELSE  strValue=propShort
    				parse the strValue and transpose the data (row to column coversion)
    				pars logic:  (refer sample string parsing example )
    					subStr= start Index (string after the  230\4) to end Index= value after 230\4 // This is the standard notation for every enumerated values
    					Tokenzie the subStr with "\" delimiter  to get the enum number and its value // Refer the sample string value section
    					Insert  the data into ANA_ALL_ENUM_VALUES // Insert all the required data as per the table design (refer table design section)
    					Query the RPT_Locale table and ger the locale value and update the ANA_ALL_ENUM_VALUES table with :
    					update ANA_ALL_ENUM_VALUES set RPT_LOCALEFLAG=1 where ANA_ALL_ENUM_VALUES.localevalue=RPT_Locale.locale
    			}// End of While for each < tSchemaId>
    		} //End of For each < fieldId>
    } // End of For each < fieldId>
    } // End of  While for each <ARForm>
    End // End of Procedure
    • No labels


    1. "If your application uses an overlay form..."

      What application and what form exactly? There are dozens of applications and thousands of forms in ITSM.

      1. Hi Ivan,

        I will check with the SMEs and get back to you.