AddSDI
Description:
Adds new SDIs and SDI Templates, and returns their identifiers.
Input Properties
sdcid
Description:
Identifier of the SDC.
Required:
Yes
keyid1
Description:
Identifiers of the SDIs.
Required:
Yes
keyid2
Description:
Identifiers of the SDIs.
Required:
Only for multi-key SDCs.
keyid3
Description:
Identifiers of the SDIs.
Required:
Only for multi-key SDCs.
auditreason
Description:
Auditing information recorded in the "Reason" column of the TraceLog table.
Required:
No
auditactivity
Description:
Auditing information recorded in the "Activity" column of the TraceLog table.
Required:
No
auditsignedflag
Description:
Auditing information recorded in the "SignedFlag" column of the TraceLog table.
Required:
No
auditdt
Description:
Auditing information recorded in the "ModDt" column of the TraceLog table.
Required:
No
eventnotify
Description:
Determines whether or not (Y/N) an EventNotify Action is posted onto the ToDo List when this Action executes.
Deprecated:
As of version 7, Event Notify actions are no longer generated
templateid
Description:
Identifier of a single-key SDI Template.
Required:
Only if the new SDIs are based on a single-key SDI Template.
templatekeyid1
Description:
Identifier of a multi-key SDI Template.
Required:
Only if the new SDIs are based on a multi-key SDI Template.
Comments:
  • If you enable Automatic Key Generation (using the overrideautokey property) and do not specify keyid1, keyid2, and keyid3, the keys are automatically generated.
  • If the SDI Template has User Roles and Role Level Access is enabled, the Roles are added to the new SDIs.
templatekeyid2
Description:
Identifier of a multi-key SDI Template.
Required:
Only if the new SDIs are based on a multi-key SDI Template.
Comments:
  • If you enable Automatic Key Generation (using the overrideautokey property) and do not specify keyid1, keyid2, and keyid3, the keys are automatically generated.
  • If the SDI Template has User Roles and Role Level Access is enabled, the Roles are added to the new SDIs.
templatekeyid3
Description:
Identifier of a multi-key SDI Template.
Required:
Only if the new SDIs are based on a multi-key SDI Template.
Comments:
  • If you enable Automatic Key Generation (using the overrideautokey property) and do not specify keyid1, keyid2, and keyid3, the keys are automatically generated.
  • If the SDI Template has User Roles and Role Level Access is enabled, the Roles are added to the new SDIs.
overrideautokey
Description:
Enables/disables (Y/N) Automatic Key Generation. If enabling, specify keyid1, keyid2, and keyid3 for each new SDI.
Required:
No
templateflag
Description:
Determines whether or not (Y/N) new SDIs are created as SDI Templates.
Required:
Only if new SDIs are created as SDI Templates.
copies
Description:
Number of copies to make of the new SDI.
Required:
No (defaults to 1).
Comments:
  • This works whether or not you base the new SDIs on an SDI Template.
  • To make multiple copies of an SDI Template, enable Automatic Key Generation using the overrideautokey property.
adduserroles
Description:
Grants/blocks (Y/N) SDI access for all Roles assigned to the current user.
Required:
No
Comments:
  • Do not use this property if the new SDIs are based on an existing SDI Template. In this case, use the addtemplateroles property.
  • Role-Level Access must be enabled for the SDC.
  • Use this property only in a JSP, as the JSP can pass the connectionid to the Action (thereby identifying the current user).
addtemplateroles
Description:
Set to N to not automatically add attributes from sdc master list
Required:
No
Comments:
  • Use this property only if the new SDIs are based on an existing SDI Template.
  • Role-Level Access must be enabled for the SDC.
  • Use this property only in a JSP, as the JSP can pass the connectionid to the Action (thereby identifying the current user).
usetemplatedepartment
Description:
If Departmental Security is enabled for the SDC, the new SDI is created with the SecurityDepartment and SecurityUser columns. The AddSDI Action automatically populates these columns as follows:
  • If you pass values to either (or both) of these columns, the values are used and can be modified by the EditSDI Action.
  • If you do not pass a value to the SecurityUser column, it is popluated with the current user.
  • If the SDI you are creating is based on an existing SDI Template (using the SDI Template property), and the SDI Template has a SecurityDepartment column, the usetemplatedepartment property behaves in this manner:
    • Y copies the SecurityDepartment value from the SDI Template to the newly created SDI.
    • N (default) copies the current user's Default Department to the newly created SDI.
Required:
No
applyworkitems
Description:
If the Template Flag property is set to Yes (Y), this automatically applies Workitems from the Sample Template.
Required:
No
forcenew
Description:
Determines whether or not a new Data Set is added when Template Workitems are applied. This overrides the Workitem definition:
  • Y enables the "Force New" option for Workitems, and overrides the "Force New" setting in the Workitem Maintenance Page. When adding Workitems to this SDI, enabling the "Force New" option always creates a new dataset. This will let you resolve Data Sets after you have deleted the Workitem, as each Workitem Item will be uniquely identified.
  • N uses the "Force New" setting in the Workitem Maintenance Page.
Required:
No
copyattachment
Description:
Determines whether or not the template attachments will get copied down to the newly created SDI. This will override the AttachmentPolicy --> Copy Template Attachments property settings
  • Y enables template attachment copy-down.
  • N disables template attachment copy-down
Required:
No
copyattachmentmode
Description:
Optional Attachment Mode if copyattachment property is set to Y.
  • E makes the copied attachment an Editable attachment
  • F makes the copied attachment a Non-Editable attachment
  • L makes the copied attachment a Linked Reference attachment
  • N will not copy the template attachment
  • Defaulted to E - Editable Copy
Required:
No
copyattachmentmode_editablecopy
Description:
Identifier for copyattachmentmode property to make an Editable copy of the template attachments.
Required:
No
copyattachmentmode_noneditablecopy
Description:
Identifier for copyattachmentmode property to make a Non-Editable copy of the template attachments.
Required:
No
copyattachmentmode_linkedreference
Description:
Identifier for copyattachmentmode property to make a Linked-Reference copy of the template attachments.
Required:
No
copyattachmentmode_donotcopy
Description:
Identifier for copyattachmentmode property to prevent copying of the template attachments.
Required:
No
cmtchangerequestid
Description:
If passed in, and SDC is CMT enabled, then added SDI will be checked out under this Change Request.
Required:
No
cmtdepartmentid
Description:
If passed in, and SDC is CMT enabled, then added SDI will be checked out to this department.
Required:
No
Output Properties
newkeyid1
Description:
Identifiers of the added SDIs.
newkeyid2
Description:
Identifiers of the added SDIs.
newkeyid3
Description:
Identifiers of the added SDIs.
Additional Information
Additional information concerning this Action:
  • To add multiple SDIs, enter multiple values for keyid1, keyid2, and keyid3, and disable Automatic Key Generation:

    sdcid = Sample
    keyid1 = S01;S02;S03
    overrideautokey = Y
    This adds Samples S01, S02, and S03 to the database.

  • To base new SDIs on an SDI Template, use this single-key example as a guideline:

    sdcid = Sample
    keyid1 = S01;S02
    templateid = T01
    overrideautokey = Y
    This adds Samples S01 and S02 to the database, each based on T01. If overrideautokey = N and keyid1 has is not specified, the keys will be automatically generated.

  • If the SDI Template has User Roles specified and Role Level Access is enabled, this Action adds the Roles to the new SDI.
  • You can make multiple copies of an SDI Template if you enable Automatic Key Generation. Using the single-key property as an example:

    sdcid = Sample
    keyid1 = (null)
    templateid = T01
    overrideautokey = N
    copies = 2
    This adds two AutoKey-generated Samples to the database, each based on Template T01.

  • The copies property can be used to add multiple SDIs with Automatic Key Generation:

    sdcid = Sample
    keyid1 = (null)
    templateid = (null)
    overrideautokey = N
    copies = 2
    This adds two AutoKey-generated Samples to the database.

  • To write a single value or multiple values into the same column across multiple SDIs, use these examples as guidelines:

    sdcid = Sample
    keyid1 = S01;S02;S03
    projectid = Polymers
    customerid = UnitedPlastics
    This enters Polymers into the projectid column of Samples S01, S02, and S03, and UnitedPlastics into the customerid column of Samples S01, S02, and S03.

    sdcid = Sample
    keyid1 = S01;S02;S03
    projectid = Polymers;Fluids;Solids
    customerid = UnitedPlastics;BrandXMilk;NakaSteel
    locationid = USA;UK;Japan
    This enters Polymers, UnitedPlastics, and USA for Sample S01; Fluids, BrandXMilk, and UK for Sample S02, and Solids, NakaSteel, and Japan for Sample S03.

    sdcid = Sample
    keyid1 = S01;S02;S03
    projectid = Polymers;Fluids
    If you specify more SDIs than values, the remainding columns are assigned null values. This enters Polymers as the projectid for Sample S01 and Fluids as the projectid for Sample S02. The projectid column of Sample S03 is assigned a null value.

  • About Auto Key Generation based on columns other than keyid1:
    You can use the AddSDI Action to automatically generate a key that is based on the value in a column other than keyid1. For example, suppose you want to add a Sample SDI and you are using a Submission SDI to submit Samples to the database. You can automatically generate a SampleId key that includes the SubmissionId key as part of the SampleId key. Use an SDI Template that specifies the value of the SubmissionId column. You could also override Automatic Key Generation if you want to enter a key.
    Alternatively, you can add an Input Property to the AddSDI Action. For the propertyid, specify the name of the column required to automatically generate the key. For the property value, enter a value for that column. The downside to this approach is that if you do not know the value for this column, you must first determine it (prior to executing the AddSDI Action). Once determined, you can pass the value to AddSDI as a variable.

This Action affects records in the SDC table.

Copyright © 1999-2016 LABVANTAGE Solutions, Inc.