Difference between revisions of "Design Options"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 30: Line 30:
:: ''Learn more:'' [[Subforms]]
:: ''Learn more:'' [[Subforms]]


:* '''Summarize data in related records'''
:* '''Ongoing summary data in related records'''
::* --works for formula fields with a numeric return type, as well as numeric fields
::* This is the most robust of the summary options. It is more computationally intensive, but the summarized data is always accurate, whether records are added or changed using APIs or a view of the related records.
::* --works for number w/decimal and percentage, as well as number and currency
::* It can summarize data for wide variety of fields:
::* --does not work for Boolean or Date fields
:::* [[Formula Fields]] that return a numeric value, as well as numeric fields.
:: ''Synchronous''
:::* Decimal and percentage fields, as well as numbers and currencies.
::* --always accurate
::: (Data cannot be summarized for Boolean or Date fields, but that is rarely needed.)
::* --compute-intensive
::* ''Synchronous'' summaries are the always accurate, because a new summary is calculated whenever data changes. (This is the kind of summary supported in the {{EnterpriseBrand}} cloud.
::* --To ensure maximum performance, a [[Service Provider]] may make them unavailable in a hosted installation
::* However, the calculation is compute-intensive enough that a [[Service Provider]] may choose to make it unavailable in a hosted installation.
::* --available in AgileApps cloud
::* In those installations, ''Asynchronous'' calculations are performed. They occur in the background, on a schedule determined by the Service Provider, so the displayed value may not be completely accurate for a short period of time.
:: ''Asynchronous''
::* --occurs in background, but may not be accurate for short periods of time (as determined by Service Provider, not tenant)
:: ''Learn more:'' [[Rollup Summary Fields]]
:: ''Learn more:'' [[Rollup Summary Fields]]



Revision as of 21:14, 23 May 2014

The platform frequently provides multiple ways to get the job done. This page provides an index of options for common tasks, and provides guidelines for choosing.

Copying Data from Another Record

  • If you have a Lookup field that targets a record you want to copy from, you can automatically copy the data as part of the Lookup settings. This mechanism works for simple data fields like text, number, and dates. When the user selects a Lookup target, the field data is automatically copied.
Learn more: Lookups#Copy Data
  • If you have more complex data like formula calculations or attachments, you can put a Rule in a Rule set, and invoke that Rule Set whenever a record is added or updated. In this case, you define the rules on the object you want to copy from, and then update the record you want to copy to.
Learn more:
  • To copy complex data from a target record, add post-selection JavaScript to the definition of the Lookup field.
Learn more: Post Selection JavaScript#Copy a Field from Another Record

Summarizing Data from Multiple Records

  • Add computations to a report
  • A computation in a report does not change the structure of the object, so it does not require any special design privileges. It can be defined by any user when creating or modifying a report.
  • However, a useful computation may wind up being replicated in multiple reports, and such computations are available only when the report is run. So a summary of order-item amounts would not be available when a viewing an Order record, for example. In addition, to get the summary for one set of records, the summary for all sets of records is calculated.
  • In general, then, report computations is most useful for data that does not need to be seen when examining an individual record. (For example, the total of orders for a given date, or for a given state.)
Learn more: Reports#Compute
  • Calculate record summaries as related records are added and updated
  • Related records like OrderItems have a Lookup to an Order record.
  • A subform lets you total data for fields in those records as they are added or updated--for example, when adding an OrderItem to an Order. (The records can also be sorted on a selected column.)
  • This is the most computationally efficient way to summarize data and store it in a record.
  • It's limitation is that the calculated values are accurate only so long as the subform is used to add or change records.
  • If APIs are used to add or change records, or if changes are made to the related records directly (for example, by adding a record to the OrderItems object, rather than adding it through the subform in an Order record), then the calculated values are no longer accurate.
  • In addition, it provides column totals only. Other calculations like average, max, and min, are not available.
Learn more: Subforms
  • Ongoing summary data in related records
  • This is the most robust of the summary options. It is more computationally intensive, but the summarized data is always accurate, whether records are added or changed using APIs or a view of the related records.
  • It can summarize data for wide variety of fields:
  • Formula Fields that return a numeric value, as well as numeric fields.
  • Decimal and percentage fields, as well as numbers and currencies.
(Data cannot be summarized for Boolean or Date fields, but that is rarely needed.)
  • Synchronous summaries are the always accurate, because a new summary is calculated whenever data changes. (This is the kind of summary supported in the AgileApps Cloud platform cloud.
  • However, the calculation is compute-intensive enough that a Service Provider may choose to make it unavailable in a hosted installation.
  • In those installations, Asynchronous calculations are performed. They occur in the background, on a schedule determined by the Service Provider, so the displayed value may not be completely accurate for a short period of time.
Learn more: Rollup Summary Fields
  • Summarize data in arbitrary records
  • --can be used for unrelated records (no lookup required)
  • --calculated only when the record that contains the function is updated
  • --does not automatically reflect changes in the other records
  • --work only for a small set simple numeric fields only
- number, currency, and boolean for SUM and AVG
- number, currency, date for MAXIMUM and MINIMUM
  • --Does not work for formula fields that return a numeric type
  • --Use these to operate on Boolean and Date values
Learn more: Aggregate Functions