Skip to content

Commit 98f2726

Browse files
authored
Live publish
2 parents 5037a8a + f272fc1 commit 98f2726

File tree

3 files changed

+65
-34
lines changed

3 files changed

+65
-34
lines changed

powerapps-docs/developer/model-driven-apps/clientapi/reference/Xrm-Utility/getGlobalContext/organizationSettings.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,34 @@ Returns the ID of the current organization.
128128

129129
**Description**: Id of the current organization.
130130

131+
## isTrialOrganization
132+
133+
Returns a boolean indicating whether the organization is a trial organization.
134+
135+
### Syntax
136+
137+
`organizationSettings.isTrialOrganization`
138+
139+
### Return Value
140+
141+
**Type**: Boolean
142+
143+
**Description**: **true** if the organization is a trial organization; **false** otherwise.
144+
145+
## organizationExpiryDate
146+
147+
Returns the expiry date of the current organization if it is a trial organization.
148+
149+
### Syntax
150+
151+
`organizationSettings.organizationExpiryDate`
152+
153+
### Return Value
154+
155+
**Type**: Date
156+
157+
**Description**: Returns a `Date` object with the organization's expiry date if it is a trial organizaiton. Returns NULL if the organization is not a trial organization.
158+
131159
## uniqueName
132160

133161
Returns the unique name of the current organization.

powerapps-docs/maker/data-platform/define-calculated-fields.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Define calculated columns in Power Apps | MicrosoftDocs"
33
description: "Learn how to define calculated columns"
44
ms.custom: ""
5-
ms.date: 05/25/2018
5+
ms.date: 04/15/2021
66
ms.reviewer: ""
77
ms.service: powerapps
88
ms.suite: ""
@@ -23,25 +23,24 @@ search.app:
2323
- PowerApps
2424
- D365CE
2525
---
26-
# Define calculated columns to automate manual calculations
26+
# Define calculated columns to automate calculations
2727

2828
[!INCLUDE[cc-data-platform-banner](../../includes/cc-data-platform-banner.md)]
2929

30-
Use calculated columns to automate manual calculations used in your business processes.
30+
Use calculated columns to automate otherwise manual calculations used in your business processes.
3131

32-
For example, a salesperson may want to know the weighted revenue for an opportunity which is based on the estimated revenue from an opportunity multiplied by the probability. Or, they want to automatically apply a discount, if an order is greater than $500. A calculated column can contain values resulting from simple math operations, or conditional operations, such as greater than or if-else, and many others. You can accomplish all this by using Power Apps, no need to write code.
32+
For example, a salesperson may want to know the weighted revenue for an opportunity, which is based on the estimated revenue from an opportunity multiplied by the probability. Or, they want to automatically apply a discount, if an order is greater than $500. A calculated column can contain values resulting from simple math operations, or conditional operations, such as greater than or if-else, and many others. You can accomplish all this by using Power Apps, no need to write code.
3333

3434
## Capabilities
3535

3636
- Calculated columns use the columns from the current table or related parent tables.
3737
- The expression support is available on the current table and the related parent table columns in the **Condition** sections and the **Action** sections. The built-in functions include:
38-
**ADDHOURS**, **ADDDAYS**, **ADDWEEKS**, **ADDMONTHS**, **ADDYEARS**, **SUBTRACTHOURS**, **SUBTRACTDAYS**, **SUBTRACTWEEKS**, **SUBTRACTMONTHS**, **SUBTRACTYEARS**, **DIFFINDAYS**, **DIFFINHOURS**, **DIFFINMINUTES**, **DIFFINMONTHS**, **DIFFINWEEKS**, **DIFFINYEARS**, **CONCAT**, **TRIMLEFT**, and **TRIMRIGHT**.
38+
**ADDHOURS**, **ADDDAYS**, **ADDWEEKS**, **ADDMONTHS**, **ADDYEARS**, **SUBTRACTHOURS**, **SUBTRACTDAYS**, **SUBTRACTWEEKS**, **SUBTRACTMONTHS**, **SUBTRACTYEARS**, **DIFFINDAYS**, **DIFFINHOURS**, **DIFFINMINUTES**, **DIFFINMONTHS**, **DIFFINWEEKS**, **DIFFINYEARS**, **CONCAT**, **TRIMLEFT**, and **TRIMRIGHT**. More information: [Functions syntax](#functions-syntax)
3939
- A rich conditional support provides branching and multiple conditions. The logical operations include **AND** and **OR** operators.
4040
- The visual editing capabilities include modern user interface and intellisense in the **ACTION** section.
41-
- A seamless integration of the calculated columns with the forms, views, charts, and reports is available in real time.
41+
- A seamless integration of the calculated columns with the forms, views, charts, and reports are available in real time.
4242
- You can configure calculated columns to use custom controls.
4343

44-
4544
## Scenarios
4645

4746
- **Weighted Revenue**: Estimated revenue multiplied by probability
@@ -54,38 +53,42 @@ For example, a salesperson may want to know the weighted revenue for an opportun
5453
> [!IMPORTANT]
5554
> To create a calculated column you must have the Write privilege on the [Field Security Profile table](../../developer/data-platform/reference/entities/fieldsecurityprofile.md). If the calculated column uses the secured columns in a calculation, you should consider securing the calculated column as well, to prevent users from accessing data for which they don’t have sufficient permissions. The calculated column editor gives you a warning if you are creating a calculated column that uses secured columns in a calculation, suggesting you secure the calculated column. More information: [Column level security to control access](/dynamics365/customer-engagement/admin/column-level-security).
5655
56+
## Column types that support calculations
57+
58+
- Text
59+
- Choice
60+
- Yes/No
61+
- Whole Number
62+
- Decimal Number
63+
- Currency
64+
- Date Time
65+
5766
## Create a calculated column
5867

59-
Use the column editor to specify a calculated column. In this example we will use [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc) but the steps are similar using solution explorer. More information: [Create and edit columns](create-edit-fields.md)
60-
61-
1. Open [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc)
68+
1. Sign into [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc)
6269
1. Expand **Data** > **Tables**.
63-
1. Select the table you want and choose **Columns**. Choose **Add Field**.
64-
1. Provide the required information for the column, including the **Display name**, **Name** and **Data type**.
65-
1. If the data type is one of types that support calculated columns, you can make the column a calculated column by selecting **Add** > **Calculation**.
70+
1. Open the table you want, select the **Columns** tab, and then select **Add Column**.
71+
1. Provide the required information for the column, including the **Display name**, **Name**, and **Data type**.
72+
1. If the data type is one of the [column types that support calculations](#column-types-that-support-calculations), you can make the column a calculated column by selecting **Add** > **Calculation**.
6673

6774
![Make column calculated](media/make-field-calculated-maker.png)
6875

69-
These are the types of columns that support calculations:
70-
- Text
71-
- Choice
72-
- Yes/No
73-
- Whole Number
74-
- Decimal Number
75-
- Currency
76-
- Date Time
77-
78-
1. Selecting **Calculation** requires that you save the changes to the table. Click **Save** in the **Pending changes** dialog to proceed.
79-
1. This will open the calculated column definition editor, where the new calculated column has been created, but no formula has been set. The calculated column definition consists of two sections: **CONDITION** and **ACTION**.
76+
1. By selecting **Calculation**, you're prompted to save the changes to the table. On the **Pending changes** dialog, select **Save**.
77+
1. On the **Columns** tab, open the column that you saved in the previous step.
78+
1. On the column properties pane, select **Open calculation**.
79+
80+
<img src = "media/open-calculation-link.png" alt = "Link to open calculated column definition editor" width = "320" height = "620">
81+
82+
1. In the calculated column definition editor, notice that the new calculated column has been created, but no formula has been set. The calculated column definition consists of two sections: **CONDITION** and **ACTION**.
8083
![New Column Calculation form](media/empty-field-calculation.png)
81-
- In the **Condition** section, you can specify a table, column, operator, type, and value. In the dropdown box for the **Table**, you can choose a current table or a related table. In the **Column** dropdown box, you have a selection of all available columns for the table. Depending on the operator you choose, you may need to provide type and value. You can specify multiple conditions using the `AND` or `OR` operators.
82-
- In the **Action** section, you provide the formula for the calculated column.
84+
1. In the **Condition** section, select **Add condition** to specify a table, column, operator, type, and value. In the dropdown box for the **Table**, you can choose a current table or a related table. In the **Column** dropdown box, you have a selection of all available columns for the table. Depending on the operator you choose, you may need to provide type and value. You can specify multiple conditions using the `AND` or `OR` operators. When you're finished specifying the condition, select the check mark :::image type="content" source="../canvas-apps/media/sharepoint-scenario-build-app/icon-check-mark.png" alt-text="Save condition":::.
85+
1. After you've specified the condition, in the **Action** section, select **Add action** to provide the formula for the calculated column. When you're finished specifying the action, select the check mark :::image type="content" source="../canvas-apps/media/sharepoint-scenario-build-app/icon-check-mark.png" alt-text="Save condition":::.
8386

84-
> [!NOTE]
85-
> You can use data from Lookup rows within your Action. You first have to select the Lookup column and then type a period. After that, you can select one of the columns available on the related table. For example, in the case of *`<LookupFieldName>.<RelatedFieldName>`*, you can select: `ParentAccountId.AccountNumber`.
86-
>
87-
> Note that column level security will be ignored on the related table, so if there is sensitive data in the accessed column we suggest securing your calculated column as well.
88-
87+
> [!NOTE]
88+
> You can use data from Lookup rows within your Action. You first have to select the Lookup column and then type a period. After that, you can select one of the columns available on the related table. For example, in the case of *`<LookupFieldName>.<RelatedFieldName>`*, you can select: `ParentAccountId.AccountNumber`.
89+
>
90+
> Note that column level security will be ignored on the related table, so if there is sensitive data in the accessed column we suggest securing your calculated column as well.
91+
1. In the calculated column definition editor, select **Save and Close**.
8992

9093
<a name="BusinessScenarios"></a>
9194

@@ -97,7 +100,7 @@ Let’s take a look at calculated column examples in more detail.
97100

98101
In this example, we are using the columns of the opportunity table to calculate the weighted revenue based on the opportunity’s probability. In the column editor for an opportunity table, we create a column called **Weighted Revenue** and specify the column type as **Calculated** and the data type is **Currency**.
99102

100-
In the calculated column definition editor, in the **Condition** section, we specify the opportunity with the Status = Open. In the **ACTION**, the formula calculates the weighted revenue based on the opportunity estimated revenue multiplied by the probability of the opportunity. The following screenshots show step-by-step how to define the **Weighted Revenue** calculated column.
103+
In the calculated column definition editor, in the **Condition** section, we specify the opportunity with the Status = Open. In the **ACTION**, the formula calculates the weighted revenue based on the opportunity estimated revenue multiplied by the probability of the opportunity. The following screenshots show step by step how to define the **Weighted Revenue** calculated column.
101104

102105
#### Set the condition on the opportunities:
103106

@@ -111,7 +114,7 @@ In the calculated column definition editor, in the **Condition** section, we spe
111114

112115
![Weighted revenue to est. revenue in Dynamics 365](media/calculated-field-open-opportunity.png)
113116

114-
### Follow-up date of opportunity
117+
### Follow up date of opportunity
115118

116119
In this example, we are using the columns of the originated lead of an opportunity to calculate the appropriate date when to follow up on the opportunity.
117120

@@ -123,7 +126,7 @@ In the **ACTION**, we provide two formulas:
123126
- To follow up in one week on the immediate opportunity
124127
- To follow up in one month if the opportunity is not likely to happen right away.
125128

126-
The following screenshots show step-by-step how to define the **Follow-up date** calculated column.
129+
The following screenshots show step by step how to define the **Follow-up date** calculated column.
127130

128131
#### Set the two conditions on the originating lead:
129132

Loading

0 commit comments

Comments
 (0)