If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Configuring Owner Embedded Links

Follow these steps to configure the owner entity for a shared embedded link:

  1. Create a new Entities record or open an existing record that you intend to modify. See Creating a New Entity for instructions.
    • For this step, complete the top area of the Entities form, add security settings, and add entity fields (except for the embedded link).
    • Keep in mind that the security settings on the embedded entity and the container entity should meet the design requirements that you identified previously.
       
  2. Open a new Fields record for the embedded link.
  3. Enter a Name for the embedded link.
    • Aptify's standard naming convention for linked fields is the name of the linked entity (in its singular form) and the linked entity field. For example, the name of a field linked to the Addresses entity's ID field would be AddressID.
    • The Display Name fills in automatically when you specify a Name.
       
  4. Select the embedded entity from the Linked Entity drop-down list.
  5. Select ID from the Linked Field drop-down list.
  6. Select Embedded from the Link Type drop-down list and press the Tab key.
    • The Mode field appears.
       
  7. Set Mode to Dynamic.
    • The Dynamic Sharing tab appears.
       
  8. Click the Dynamic Sharing tab.  

    Dynamic Embedded Link Field 
  9. In the Dynamic Flowdown Proc field, specify the stored procedure that defines the update logic for non-owner links that may share the owner's embedded record.
    • This field links to the Database Objects service.
    • You can use the stored procedure linked to the Companies entity's AddressID field or the Organizations entity's AddressID field as samples when writing your own stored procedures.
       
  10. Add the non-owner fields referenced in the Dynamic Flowdown Proc procedure to the Dynamic Sharing Relationship sub-type area.
    • For each sub-type record, enter the following information:
      • Related Entity: Enter the name of the entity that can share this owner's embedded record.
      • Related Entity Field: Enter the name of the field in the Related Entity that links to the same embedded entity as the owner.
      • Dynamic Flowdown Filter: This field is reserved for future use.
         
    • For example, a company's Addresses record may be shared by the Persons entity's AddressID field.
       
  11. Click the Validation tab and configure the embedded link's Is Required behavior.
    • If you want to require a user to specify a value for all of the required fields in the embedded entity, leave the Is Required box checked under the Validation tab.
    • If you want to allow users to save the container record without specifying all of the required embedded fields, clear the Is Required option on the Validation tab and select the Allow Null option on the General tab.
       
  12. Click OK to save and close the Fields record.
    • You do not want to enable the field's Show In Find or Default In View options since you want the link to be transparent to users.
    • The Aptify Entity Virtual Fields wizard appears automatically when you close an embedded link's Fields record.
       
  13. Use the wizard to create a virtual field for each of fields in the embedded entity that you want to display on the container entity's form.
    • Select the Create check box for each field you want to embedded in the container entity. At a minimum, you must create a virtual field for each of the required fields in the embedded entity, except for ID. (Do not create a virtual field for the embedded entity's ID field.) 

      Creating -irtual Fields for Shared Embedded Links 
    • If you want the field to appear in views of the container entity by default, select the check box in the corresponding Default In View box.
    • Enter the name of the field in the Virtual Field column. The name cannot contain spaces or dashes. Aptify recommends the following naming convention: [Singular form of embedded entity name]ID_[Field Name]. For example, AddressID_PostalCode.
    • Enter the name that will appear as this field's caption on the container entity's form and in views of the container entity. Typically this will be the field's name with appropriate spacing (such as, Postal Code).
    • Enter a Description for one or more virtual fields, if desired.
       
  14. Click OK to create the virtual fields.
    • Note that if the embedded link is not required, the virtual field's Join Type is Optional. If the embedded link is required, the virtual field's Join Type is Required. If you subsequently change the embedded link's Is Required field, the Join Types for the related virtual fields update automatically when you save the entity. See Join Type.
    • A Virtual Field inherits the SQL Data Type of the Fields record it is linked to.
    • If applicable, a Virtual Field inherits the Values record and Default Value setting of the Fields record it is linked to. (Note that while the values appear in the drop-down list for the embedded field on a top-level form, the Values tab on the Virtual Field remains blank though.)
       
  15. If you want one or more of the virtual fields to appear on a tab other than General on the generated form, open the applicable Fields record and enter the tab name in the Category field. 
  16. Save and close the Entities record.

Copyright © 2014-2017 Aptify - Confidential and Proprietary