Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Domain

Index

Functions

create

  • Create a new domain with the given kind, domainDesign, and options or specify a domain template to use for the domain creation. Not all domain kinds can be created through this API. See CreateDomainOptions.kind for supported domain kinds.

    For each domain you can specify each field's metadata. The properties for field's can be found on DomainDesign.fields.

    LABKEY.Domain.create({
       kind: 'IntList',
       domainDesign: {
           name: 'LookupCodes',
           description: 'integer key list',
           fields: [{
               name: 'id',
               rangeURI: 'int',
           },{
               name: 'code',
               rangeURI: 'string',
               scale: 4,
           }]
       },
       // Domain kind specific options
       options: {
           // These options are specific to an 'IntList'
           keyName: 'id',
           keyType: 'Integer', // or 'AutoIncrementInteger'
       },
    });
    

    Create domain from a domain template:

    LABKEY.Domain.create({
       module: 'mymodule',
       domainGroup: 'codes',
       domainTemplate: 'LookupCodes',
       importData: false,
    });
    

    Import the initial data from the domain template of a previously created domain:

    LABKEY.Domain.create({
       module: 'mymodule',
       domainGroup: 'codes',
       domainTemplate: 'LookupCodes',
       createDomain: false,
       importData: true,
    });
    

    Parameters

    Returns XMLHttpRequest

drop

get

getDomainDetails

  • Gets a domain design.

     function successHandler(domainDesign){
         var html = '';
    
         html += '<b>' + domainDesign.name + ':</b><br> ';
         for (var i in domainDesign.fields){
             html += '   ' + domainDesign.fields[i].name + '<br>';
         }
         document.getElementById('testDiv').innerHTML = html;
     }
    
     function errorHandler(error){
         alert('An error occurred retrieving data: ' + error);
     }
    
     LABKEY.Domain.getDomainDetails({
         schemaName: 'study',
         queryName: 'StudyProperties',
         success: successHandler,
         failure: errorHandler
     });
    

    Parameters

    Returns XMLHttpRequest

getProperties

getPropertyUsages

  • Get usages of one or more properties. Up to maxUsageCount objects will be included in the response.

    Parameters

    Returns XMLHttpRequest

listDomains

  • List domains by domain kind and optionally include the field definitions.

    Parameters

    Returns XMLHttpRequest

save

updateDomain

Generated using TypeDoc