The main use of field rules right now is to define default dates for your fields. When you're building reports using multiple dates, for example:
You can use field rules to help simplify configuration of reports using multiple dates. If you're reporting on inventory management or e-commerce data, you'll usually have a Revenue and COGS Details folder with multiple date fields such as Order Date, Invoice Date, and Ship Date. You can use field rules to make the data source default to one of those date fields so that when you're setting up the report, it automatically chooses that date field.
How do I customize field rules?
Navigate to the data source you want to define the rule against on the Home page. Click on Configuration, then click on Field Rules.
How do I define a field rule?
Click on Add Rule on the Field Rules window. Clicking on this button will pop up a window which enables you to define a rule of the form:
if (field matches this criteria) (perform this action on the field) (details of the action)
Available criteria are:
Available actions are:
You might have a set of joins that you want to use whenever a certain field from a data source is in a report, while not applying those joins across all of your data source. For example, all of our inventory integrations include a 'Demand Line Fields' data source which calculates out inventory velocity based on components used in bills of materials. Since this pretty fundamentally changes report values, we only want to use the joins to the demand line fields if we're actually using the demand line fields in our report. To do so, we can first set up a report with joins customized in the way we want:
Next, set your field rule to use the report you created and set it to run when any field from the data source want is in the report:
With this field rule defined, it will automatically use that join report when you build a report using that field:
You can confirm the use of the join report by clicking on Quick Actions -> Report Performance: