Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The xpfGetModel function returns the instanceId of the specified model in the argument <modelId>. A model is uniquely specified by the <repositoryId> and <modelName> arguments. If the specified model exists in the database, the modelId defining the model will be returned in the <modelId> argument.

Arguments

...

TypeNameComment
GENERICrepositoryIdUnique integer representing the repository in the EDMdatabase
STRINGmodelNameThe name of the model in the given repository

Return Value

...

 

TypeNameComment
GENERICmodelIdUnique instance id of the model

Options

...

 

Example

...

Code Block
languagecpp
<Missing Example>  FUNCTION copyModel(sourceModelId : GENERIC) : GENERIC;
    LOCAL
      targetModelId           : GENERIC;
      controlId               : GENERIC;
      targetModelRepositoryId : GENERIC;
    END_LOCAL;
    ON_ERROR_DO;
      xpxPrintf('\nError.');
      xpxThrow;
    END_ON_ERROR_DO;
    
    targetModelRepositoryId := xpfGetRepository('DataRepository');
    targetModelId := xpfCopyModel(sourceModelId, targetModelRepositoryId, 'NAME_OF_COPIED_MODEL');
    xpxPrintf('\ntargetModelId : %lu',targetModelId);
    controlId :=  xpfGetModel(targetModelRepositoryId,'NAME_OF_COPIED_MODEL');
    xpxPrintf('\ncontrolId : %lu',controlId);
    IF(controlId :<>: targetModelId) THEN
      xpxThrow;
    END_IF;
    
    RETURN(targetModelId);
  END_FUNCTION;

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "extension_schema" and parent = "5636522"

...