SOLUTION - Divide the Income entries by Payment Method in "Payment Methods"
In this page you find the step-by-step solution to Exercise: Divide the Income entries by Payment Method in Payment Methods.
Establishing a Relation Transactions_Income_Detail
in Payment Methods Storage¶
In a Storage, you can establish multiple Relations using the same couple of fields. You can have as many Relations as you want for the same couple. Be sure to differentiate the Relations with names that express the Relation's role clearly.
You will create a Relation identical to Transactions_Expenses_Detail
called Transactions_Income_Detail
. You will configure Transactions_Income_Detail
as Detail Income in Payment Methods.
- From Storages in Home, enter the editor of the Payment Methods Storage.
-
In Payment Methods, establish a Relation with Transactions.
The fields are
IdPaymentMethod
in Payment Methods and thePaymentMethodId
field in Transactions. Name the RelationTransactions_Income_Detail
. -
Save any change on the Payment Methods Storage.
Configuring the Income Detail on Payment Methods Application¶
At this stage, you must configure the Relation Transactions_Income_Detail
as Detail.
- Access to Payment Methods's Design Mode.
-
Go to the Details sub-panel of Payment Methods.
-
Create a new Detail by clicking on Add Detail.
-
Drag & Drop the Table option () below the task-bar to the center of the sub-panel.
Choose as table for the Detail the only option available:
Transactions_Income_Detail
. -
The window will display the fields of the Storage Transactions
Make the same changes you did for the Expenses Detail to the field settings.
You can ignore the configuration of
PaymentMethodId
. Since you are configuring a Detail of Payment Methods, you do not need to show the information twice both in the Master and the Detail. -
Click on the Confirm button to save the changes to the Detail.
-
You have configured the Detail. Customize name and icon of the Detail's tab.
- Type the Detail Tab's name in the textbox. Call the Detail's tab Income
- Choose an icon for the tab, like (search
plus
).
-
In the Layout sub-panel, click on the Income tab to customize and arrange the columns.
-
At this point, you must apply a restriction Formula to Income to list only the Income entries associated with the Payment Method.
-
(1) Click on the Settings sub-panel on the left task-bar.
-
(2) In the left part of the sub-panel, click on the Expense tab.
-
(3) Click on Restrictions > Row.
-
-
The Formula Editor will appear.
Type or copy & paste the following Formula:
1
=EQ($CURRENTSTORAGE.IncomeExpensesTypeId; 2)
The formula is the same of Configuring the Expenses Detail in the Payment Methods Application, but the ID of reference is now 2.
2 stands for the ID of the entry "Income" in Income Expense Type storage.
-
Save all the changes in Payment Methods's Design Mode.
You now have a Detail that lists all the Income for each Payment Method besides the Expenses.
Congratulations, you have completed the exercise! Go back to the tutorial.