Dataverse Account Name Prefix Formula in Power Automate
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
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?
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
- https://learn.microsoft.com/en-us/power-automate/use-expressions-in-conditions
- https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference
These links open the official vendor documentation in a new tab.
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?
What happens in option C if Account Category Code is neither 1 nor 2?
Should I use triggerOutputs() or triggerBody() to read Dataverse account fields?
Community Votes
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
-
jonnyboy89 👍 1 Answered CC. 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.