You are here:
Prepare the Report Data
Create business logic methods in Visual Studio Code-based Modeler to define the data that business reports and charts show.

Use more general search terms.
Select fewer filters to broaden your search.
You are here:
Create business logic methods in Visual Studio Code-based Modeler to define the data that business reports and charts show.
| Available in: Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled |
| User Permissions Needed | |
|---|---|
| To prepare the report data: | CG Cloud Developer, Admin |
run sf mdl add and enter these details.
? Select the resource you want to add: Businesslogic
? Specify a name for the business logic: GetCompetitorRate
? Select the module to which the GetCompetitorRate business logic is added: MyDisplay
? Select a suitable option for the GetCompetitorRate business logic: method
? Select the reference object to add the business logic method: LoMyDisplays
* @returns competitorRate
let competitorRate;
let competitorDisplays = 0;
competitorDisplays = me.filter(function(comp){ return comp.competitorDisplay == "1";}).length;
let Displays = me.getCount();
competitorRate = 100 * competitorDisplays / Displays;

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.