Swiss Magic Data -- Form Relationships: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
En este artículo se dan las generalidades de la estructura del editor de datos [[Swiss Magic Data Editor|swiss magic]] que se utilizó para crear la interfaz de la red para definir [[Custom Reporting -- Creating Form Relationships|relaciones de formularios]].  Recuerde que un nodo swiss de tipo XXX se implementa por la clase I2CE_Swiss_XXX.  Todas las clases mencionadas están contenidas en el directorio 
In this article we over view the [[Swiss Magic Data Editor|swiss magic]] structure used to create the web interface to define [[Custom Reporting -- Creating Form Relationships|form relationships]].  Recall that a swiss node of type XXX is implemented by the class I2CE_Swiss_XXX.  All the classes mentioned are contained in the
  I2CE/modules/Forms/modules/FormRelationships/lib
  I2CE/modules/Forms/modules/FormRelationships/lib
directory.




==FormRelationship_Base==
==FormRelationship_Base==
Esta es la clase base que esta contenida como sub-clase en todas las clases Swiss que se utilizan para editar Relaciones de Formularios.
This is the base class which is sub-classed by all of the Swiss classes used to edit form Relationships.


==FormRelationships==
==FormRelationships==
El '''root swiss node''' del editor de relaciones de formularios es de tipo  ''FormRelationships.''   
The '''root swiss node''' of a the form relationship editor has type ''FormRelationships.''   
Tiene la siguiente funcionalidad:
It has the following functionality:
*Es un nodo contenedor que contiene todas las relaciones de formularios.
*It is a container node which contains all of the form relationships.
*Crea una nueva relación de formulario con un "Display Name" dado y un "Short Name" al crear un Nuevo nodo de datos magic secundario. La nueva relación se puede basar en:
*Creates a new form relationship with a given "Display Name" and "Short Name" by creating a new child magic data node. The new relationship can be based on:
**Escoger un formulario primario
**Choosing a primary form
**Escoger una relación existente de la cual copiarla.
**Choosing an existing relationship to copy from.


Todos los secundarios de este nodo swiss tienen tipo [[#FormRelationship]].
All children of this swiss node have type [[#FormRelationship]].


==FormRelationship==
==FormRelationship==
Este es el nodo swiss que contiene toda la información acerca de una relación de formularios particular.
This is the swiss node that contains all the information about a particular form relationship.


Tiene la siguiente funcionalidad:
It has the following functionality:
*Especifíca el formulario
*Specify the form
*Especifíca el nombre de visualización de este formulario en la relación
*Specify the display name of this form in the relationship
*Especifíca la descripción de este formulario en la relación
*Specify the description of this form in the relationship
*vincula al menú de [[#FormRelationship_Joins|formularios unidos]]  
*links to the [[#FormRelationship_Joins|joined forms]] menu
*vincula al menú de [[#FormRelationship_Where|limitación]] de este formulario
*links to the menu for [[#FormRelationship_Where|limiting]] this form
*vincula al menú de [[#FormRelationship_ReportingFunctions|funciones sql ]]  
*links to the menu [[#FormRelationship_ReportingFunctions|sql functions]] menu


Los nodos swiss secundarios se nombran:
The child swiss nodes are named:
*'reporting_functions' with type [[#FormRelationship_ReportingFunctions]]
*'reporting_functions' with type [[#FormRelationship_ReportingFunctions]]
*'joins' with type [[#FormRelationship_Joins]]
*'joins' with type [[#FormRelationship_Joins]]
Line 33: Line 34:


==FormRelationship_Joins==
==FormRelationship_Joins==
Este es el nodo swiss que contiene toda la información acerca de los formularios unidos al formulario del nodo swiss primario.
This is the swiss node that contains all information about forms joined to the form of the parent swiss node.
Tiene la funcionalidad:
It has the functionality:
*Unir en un formulario relacionado el formulario definido por el nodo swiss primario
*Join in a form related the the form defined by parent swiss node
Todos los secundarios de este nodo swiss tienen tipo [[#FormRelationship_Join]].
All children of this swiss node have type [[#FormRelationship_Join]].
==FormRelationship_Join==
==FormRelationship_Join==
Este es el nodo swiss que representa un formulario unido en la relación del formulario.   
This is the swiss node that represents a form joined into the form relationship.   


It subclasses  [[#FormRelationship]] and has almost the same functionality and children. The difference is that:
It subclasses  [[#FormRelationship]] and has almost the same functionality and children. The difference is that:
Line 84: Line 85:


'''Note:'''  This functionality should probably be moved to be a sub-module of Forms.
'''Note:'''  This functionality should probably be moved to be a sub-module of Forms.
[[Category:Technical Overview]][[Category:Magic Data]][[Category:Forms]][[Category:Reports]][[Category:Review2013]]
[[Category:Magic Data]][[Category:Review2013]]

Latest revision as of 14:42, 8 November 2013

In this article we over view the swiss magic structure used to create the web interface to define form relationships. Recall that a swiss node of type XXX is implemented by the class I2CE_Swiss_XXX. All the classes mentioned are contained in the

I2CE/modules/Forms/modules/FormRelationships/lib

directory.


FormRelationship_Base

This is the base class which is sub-classed by all of the Swiss classes used to edit form Relationships.

FormRelationships

The root swiss node of a the form relationship editor has type FormRelationships. It has the following functionality:

  • It is a container node which contains all of the form relationships.
  • Creates a new form relationship with a given "Display Name" and "Short Name" by creating a new child magic data node. The new relationship can be based on:
    • Choosing a primary form
    • Choosing an existing relationship to copy from.

All children of this swiss node have type #FormRelationship.

FormRelationship

This is the swiss node that contains all the information about a particular form relationship.

It has the following functionality:

  • Specify the form
  • Specify the display name of this form in the relationship
  • Specify the description of this form in the relationship
  • links to the joined forms menu
  • links to the menu for limiting this form
  • links to the menu sql functions menu

The child swiss nodes are named:

FormRelationship_Joins

This is the swiss node that contains all information about forms joined to the form of the parent swiss node. It has the functionality:

  • Join in a form related the the form defined by parent swiss node

All children of this swiss node have type #FormRelationship_Join.

FormRelationship_Join

This is the swiss node that represents a form joined into the form relationship.

It subclasses #FormRelationship and has almost the same functionality and children. The difference is that:

  • It does not link to the SQL Functions menu
  • It shows how this form is joined to the parent form in the relationship (the primary form does not need this as it has no parent)
  • It allows you to "drop empty rows."
    Note: The language should be cleaned up here as we use form relationships outside of the Custom

Reporting scenario. It means that a set of forms potentially satisfying a form relationship is will fail to satisfy the relationship if there is no form matching the where clause at this node.

FormRelationship_Where

This provides a where (sub)-clause for a form relationship. It has the following functionality:

  • if not specified, allow you to specify the "type" of the node as either a logical operator (AND, OR, NOT, XOR) or as a limit on a field in the form
  • if specifed, allows you to change the "type"

There is one child swiss node 'operands' which has type #FormRelationship_Where_Operands

Note: The functionality of this swiss node should probably be moved to a sub-module of the FormLimits modules

FormRelationship_Where_Operands

This node is used in the case where the parent swiss node is one of the logical operators AND, OR, NOT or XOR. It has the following functionality:

  • Displays the existing operands
  • Adds a new operand for the logical operators if possible (NOT has only one operand)
  • Allows you to remove an operand

All children of this node are of type #FormRelationship_Where

Note: The functionality of this swiss node should probably be moved to a sub-module of the FormLimits modules

FormRelationship_ReportingFunctions

This swiss node is a container for all of the SQL functions that are defined for the form relationship. It has the following functionality:

  • display the existing sql functions in the relationship
  • adds in a place for a new sql function determined by "Short Name," a "Display Name" and a "Description"

All children of this node have type #FormRelationship_ReportingFunctions.

Note: This functionality should probably be moved to be a sub-module of Forms.

SQLFunction

This swiss node is used to define a SQL function in a relationship. It has the following functionality:

  • edit the display name
  • edit the description
  • edit the SQL function which is applied to any of the form fields in the relationship
  • choose the return type of the SQL function to be any of the (non-abstract) subclasses of I2CE_FormField.

Note: This functionality should probably be moved to be a sub-module of Forms.