Dataverse Account Name Prefix Formula in Power Automate

AB-410 By islever Editorial Last updated

Short answer

C Use the triggerOutputs() formula that tests Account Category Code 2 and returns Standard | when true and Preferred | for Account Category Code 1.

Question

You are creating a Power Automate flow for an automation targeting Dataverse.
When a new account is created in Dataverse, the name of the account must be updated based on the following logic:
• If the Account Category Code equals Preferred Customer (1), pre-append the value Preferred | to the name.
• If the Account Category Code equals Standard (2), pre-append Standard | to the name.
You need to define the correct formula to use for the automation.
Which formula should you use?
  1. if(equals(outputs(‘trigger’)?[‘body/accountcategorycode’], 1), concat(‘Standard | ’, outputs(‘trigger’)?[‘body/name’]), concat(‘Preferred | ’, outputs(‘trigger’)?[‘body/name’]))
  2. if(equals(triggerOutputs()?[‘body/accountcategorycode’], 1), concat(‘Standard | ’, triggerOutputs()?[‘body/name’), concat(‘Preferred | ’, triggerOutputs()?[‘body/name’]))
  3. if(equals(triggerOutputs()?[‘body/accountcategorycode’], 2), concat(‘Standard | ’, triggerOutputs()?[‘body/name’]), concat(‘Preferred | ’, triggerOutputs()?[‘body/name’])) Correct Answer
  4. if(equals(outputs(‘trigger’)?[‘body/accountcategorycode’], 2), concat(‘Standard | ’, outputs(‘trigger’)?[‘body/name’]), concat(‘Preferred | ’, outputs(‘trigger’)?[‘body/name’]))

Key Takeaways

It tests reading Dataverse trigger fields with triggerOutputs() and matching the if() true/false branches to the Account Category Code rules, with the main trap being a correct-looking condition paired with reversed prefixes or the wrong trigger accessor.

This AB-410 item tests the Power Automate expression used to update a Dataverse account name from a trigger; the correct formula is C, which checks Account Category Code 2 with triggerOutputs() and returns Standard | or Preferred |.

Common mistake: The most plausible wrong answer is D: it has the right Standard/Preferred mapping but reads the trigger through outputs('trigger') instead of the supported triggerOutputs() accessor; option B is also tempting because it tests code 1, yet its true/false branches are inverted and one bracket is malformed.

Expert Analysis

The trigger payload and accessor

The flow starts when a Dataverse row is created. The trigger’s body contains the new account record, including accountcategorycode and name. In a Power Automate expression, the supported way to read those fields is triggerOutputs?['body/accountcategorycode'] and triggerOutputs?['body/name']. outputs('trigger') belongs to an action-output pattern and is not the correct accessor for this Dataverse trigger body, so options A and D are already suspect even though D’s category mapping is plausible.

Align the if branches with the category code

The question defines two mappings: Preferred Customer = 1 must produce Preferred | , and Standard = 2 must produce Standard | . An if expression evaluates a condition and returns the first concat when true, the second when false. Option C tests accountcategorycode against 2; when true it returns Standard | and when false it returns Preferred | . That exactly matches the required output for code 2 and, because the scenario supplies only codes 1 and 2, correctly gives code 1 the Preferred prefix. Options A and B compare against 1 but return Standard for true, which inverts the mapping; B also contains a malformed ['body/name') bracket. A reviewer’s note captures the point: B is “wrong way around,” while C uses the correct triggerOutputs syntax.

Why the exact expression matters

This is not just a naming question; it tests whether the condition and output branches are read together. A formula can test the right field and still fail by returning the wrong prefix, or by using a slightly invalid function call. Option C is the only choice that combines the correct trigger accessor with the correct true/false mapping.

Official Reference

Exam Strategy

In Power Automate expression questions, first confirm the trigger accessor: Dataverse trigger fields are read with triggerOutputs()?['body/…'], not outputs('trigger'). Then build a truth table for the required branches and compare the option’s true/false outputs—do not stop at “the condition looks close.” Finally, scan the exact expression for bracket, quote, and punctuation errors, since distractors often combine correct logic with a malformed function call.

Frequently Asked Questions

Why is option C correct rather than option D when both check Account Category Code 2?

C uses triggerOutputs(), the supported accessor for the Dataverse trigger body. D reads the trigger through outputs('trigger'), which does not correctly expose the trigger body in this expression pattern.

What happens in option C if Account Category Code is neither 1 nor 2?

Option C treats every value other than 2 as the false branch, so it would apply the Preferred prefix. The question only defines codes 1 and 2, but production flows should guard or validate other values.

Should I use triggerOutputs() or triggerBody() to read Dataverse account fields?

Either can work, but the path changes: triggerOutputs() returns the full output object, so use ['body/name']; triggerBody() returns the body directly, so use ['name'].

More AB-410 FAQ →

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 1 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 1

  1. jonnyboy89 👍 1 Answered C
    C. B is the wrong way around, C = "Standard |" as per requirement. and uses correct syntax: triggerOutputs()

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to AB-410 Study Guide