Loading Forms Based on Usage Context

When using forms in Aptify, there may be times when it is useful to display different forms within the same service. For example, it may be useful to display different Companies forms depending on company's type. Or perhaps, when opening a new record, the form should be optimized for data entry whereas when opening an existing record, the form should be optimized for viewing information.  Aptify includes functionality that allows different forms to appear based on the usage context. To implement this functionality, top-level forms (that is Form Templates that have Is Top Level set to true) include a Filter Rules control in which a form template administrator can determine the context in which a particular form is displayed based on usage. The below example illustrates how Aptify has used this functionality to provide a Products form that is specific to Meetings.

Top Level Form With Filter Rule
When the Apply Filter Rule box is checked, a form template administrator can create filters based on several different services (context). Below describe each one:

  • Entity: Creates filters statements based on the service in which the form belongs.
    • For example, if you want a particular form to open for Companies record where the Company Type is Vendor, you could specify the following on a top-level Form Templates record (template must be associated with Companies):
      • Service: Companies
      • Field: CompanyType
      • Operator: Exactly Matches
      • Value: Vendor 
    • If you want a different form to be displayed when a user opens a new record in a service, specify an entity filter statement with an ID value <= 0. To display a particular form for existing records, specify a filter statement with and ID value > 0
  • User: Creates filters based on attributes of the currently logged in user.
    • For example, if you want users with trusted user accounts to be displayed a certain form, you could specify the following filter statement on a top-level Form Templates record. 
      • Service: Users
      • Field: IsTrusted
      • Operator: =
      • Value:
  • Group: Created filters based on a group's permissions.
    • For Example, if you want users whose primary group is Accounting to be displayed a certain form, you could specify the following filter statement on a top-level Form Templates record.
      • Service: Groups
      • Field: Name
      • Operator: Exactly Matches
      • Value: Accounting 
  • Application Context: Creates filter statements based on the application environment from which the form is launched.
    • For example, if you want a different form to appear for Aptify Web Access Users than Aptify Smart Client users, and you could specify the following filter statement on a top-level Form Templates record using the Application Name field. By default, this is set to the value of the configuration file attribute, Startup.GeneralStartup.ApplicationName, but it can also be set programmatically.
      • Service: Application
      • Field: Application Name
      • Operator: Exactly Matches
      • Value: AWA 
  • The Application Context service includes several fields that can be used to filter based on a particular software version including:
    • MajorVersion: The Major File Version number. By default, this is set to the Major part of the File Version for Aptify Shell.exe (0 for Aptify 6.0) This can also be set programmatically.
    • MinorVersion: The Minor File Version number. By default, this is set to the Minor part of the File Version for Aptify Shell.exe (0 for Aptify 6.0, x for Aptify 6.x) This can also be set programmatically.
    • ServicePackNumber: The Service Pack number. By default, this is set to the Build part of the File Version for Aptify Shell.exe (3 for Aptify 6.0 SP3, 0 for Aptify 6.x) This can also be set programmatically.
    • UI Type: A string that is used to identify the Application's User Interface Type. It is intended to be used to differentiate between applications that are delivered to different platforms. This can be used to target Form Templates to the Desktop client, a WinForms application, Aptify Web Access (Silverlight) and, eventually, other platforms like phones and tablets. By default, the value can be defined by the configuration file attribute Startup.GeneralStartup.UIType. It can also be set programmatically. To utilize this filter, ensure that your applications are setting the UIType to a different value for each application UI type. 
  • Application Context can also be filtered based on a client's monitor including resolution height (ScreenResolutionHeight) and width (ScreenResolutionWidth) and the number of monitors (NumberofMonitors). 
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.