Versions Compared

Key

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

...

The xpfCopyModel function makes a copy of a model, i.e. creates a new model and copies all instances in the source model, specified by the argument <sourceModelId> to the new model (target model), specified by the attributes <targetModelRepositoryId> and <targetModelName>. The function returns the <targetModelId> after the copy operation. This function is only applicable to data models. The executing EDMuser must have read access to the source model. The source model will be unchanged by this operation. The source model can be open or closed when this function is executed. The new created target model will have the same underlying schema as the source model, i.e. the source and target model will be two different populations of the same Express schema.

Arguments

...

TypeNameComment
STRINGsourceNodelRepositoryNamecomments
STRINGsourceModelName 
STRINGtargetModelRepositoryName 
STRINGtargetModelName 

Return Value

...

 

TypeNameComment
GENERICtargetModlIdcomments

Options

...

 

Example

...

Code Block
languagecpp
<Missing Example>  FUNCTION createModel(sourceModelName: STRING) : GENERIC;
    LOCAL
      targetModelId           : GENERIC;
      controlId               : GENERIC;
    END_LOCAL;
    ON_ERROR_DO;
      xpxPrintf('\nError.');
      xpxThrow;
    END_ON_ERROR_DO;
    
    targetModelId := xpfCopyModelBN('DataRepository', sourceModelName, 'DataRepository', 'NAME_OF_COPIED_MODEL');
    xpxPrintf('\ntargetModelId : %lu',targetModelId);
    controlId :=  xpfGetModelBN('DataRepository','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"

...