Create a New Column in the Custom Order Table | PL-400 Exam Answer

Data Type for the New Column in the Custom Order Table

Question

You need to create a new column in the custom Order table.

The Dataverse table contains information about every order.

The new column should store the number of days since the order record was created for the open (new) orders.

The column should update the value whenever you save the record.

What should be the type of the new column?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answer: D

Microsoft Dataverse provides special column types for calculations and data aggregation.

These types are Calculation and Rollup.

The Calculation column allows users to define a formula based on the column value.

This type includes columns from the same table and related parent table in a many-to-one relationship.

Calculated columns are read-only.

Users benefit from a list of built-in functions for the calculated values.

This column type operates on the different data types like text, numeric, and date-time.

The calculations run synchronously when a record is saved.

The Rollup column is like the Calculated type.

The Rollup type operates only on the numeric (Whole Number, Decimal Number, and Currency) and date-time datatypes.

This type includes columns from the same table and related child tables in a one-to-many relationship.

The list of built-in functions for the Rollup column is smaller compared to the Calculated columns.

It includes sum, min, max, and count.

Rollup columns are read-only.

By default, the calculations for the Rollup column run once per hour.

Users can change the frequency in Customization settings for the table.

It is an asynchronous operation.

Suppose you create the calculated column “DaysOpen.” Here is the condition and action for the column:

A SAVE a SAVE AND CLOSE

CALCULATED FIELD

Set DaysOpen

4 IF...THEN

4 CONDITION (OPTIONAL)
If Order Status equals "New" @
*F = Add condition

4 ACTION

Set DaysOpen (whole number)

DifflnDays(nwind_orderdate, NOW())

Y ®

‘+ AddElse

The condition includes the check for the “New” order status.

And the action has the Difference in days between the order date and a current date/time.

If you use the NOW() function, you need to be sure that the date-time column's behavior is set to the “User local” (in this case, the nwind_orderdate or “Order date” column (Number 1))

The “User local” behavior (Number 2) stores the time zone-aware data.

This type of date-time behavior is the requirement for the NOW() operations.

Power Apps

lll

=

Home

=
=

Learn

Apps

Create

@ + 4

Data

Tables

Choices

Dataflows

Export to data lake
Connections
Custom Connectors
Gateways

o/” Flows

€ Chatbots

oG AT Builder

Solutions

+ Add column [il] Delete column

Tables > Order

Columns Relationships Business rules

Display name ~

Order Number Primary Name Column
Version Number

Status Reason

Status

Order Status

Modified On

Created On

Shipped Date

Record Created On
Order Date

Paid Date

Taxes

Shipping Fee
DaysOpen

Tax Rate

Created By

Owning Team
Modified By (Delegate)
Created By (Delegate)

Shipper

Dashboards Charts Keys

Name ¥

nwind_ordernumber
versionnumber
statuscode
statecode
nwind_orderstatusid
modifiedon
createdon
nwind_shippeddate
overriddencreatedon
nwind_orderdate
nwind_paiddate
nwind_taxes
nwind_shippingfee
ct78c_daysopen
nwind_taxrate
createdby
owningteam
modifiedonbehalfby
createdonbehalfby

nwind_shipperid

Data type 7 ¥

© Autonumber
EI Big Integer
= Choice
= Choice
= Choice
& Date and Time
& Date and Time
E1 pate only
FE] pate Only
Fl pate Only
Fl pate Only
* Decimal Number
% Decimal Number
©! puration
© Floating Point Number
& Lookup
EB Lookup
& Lookup
2 Lookup

Let Lookup

Type Y

Custom
Standard
Standard
Standard
Custom
Standard
Standard
Custom
Standard
Custom
Custom
Custom
Custom
Custom
Custom
Standard
Standard
Standard
Standard

Custom

Order Date @

Datatype* ©

) Date Only
Required* @)
| Optional

i
Customizable 8 Seaichable

Me Description ©
¥
v
v
Advanced options
v
v Oo Enable column security
v
of @ Enable auditing
v
| im Appears in global filter in interactive
v experience dashboard
v
O Sortable in interactive experience

¥ dashboard
v
ll User local
~ User local
v

Date only
v

Time zone independent

Done Cancel
v J

Options A, B, and D are incorrect because the Duration, Whole number, and Decimal number are the data types but not the column types.

For more information about The Dataverse Calculated and Rollup columns, please visit the below URLs:

Based on the requirement to store the number of days since the order record was created for the open (new) orders, the most appropriate data type for the new column would be "Duration."

A duration data type in Dataverse represents a length of time. It can store a value in terms of days, hours, minutes, seconds, and milliseconds. By using the Duration data type, the number of days since the order record was created for the open (new) orders can be easily calculated and stored in the new column.

To update the value of the new column whenever a record is saved, a "calculated" column can be used. A calculated column is a column whose value is calculated from a formula expression. The formula for the calculated column should be created to calculate the number of days between the order creation date and the current date.

The formula for the calculated column should look like this:

scss
DATEDIFF(TODAY(), [Created On], DAY)

This formula calculates the number of days between the current date (TODAY()) and the date the record was created ([Created On]). The result of this formula will be a duration in days, which will be automatically updated whenever the record is saved.

Therefore, the answer to the question is E. Duration.