I want to get the formatted value of a dataverse choice column in a power automate Select action, I am using the code below:
items()?['[email protected]']
I am having this error:
Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The template action 'Select' at line '1' and column '8339' is not valid: "The template language function 'items' must have at least one parameter.".'.'.Upgrade
Any suggestion will be appreciated
Jayraj ChhayaPosted Oct 7, 2024, 12:02 PM
To successfully retrieve the label of a Dataverse choice column in Power Automate, you need to ensure that the
items()function is provided with a valid parameter. The error you are encountering suggests that the function is being called without the necessary context.Here’s a refined approach to achieve your goal:
Ensure you are referencing the correct data source: Make sure that the data you are trying to access is correctly defined in your flow.
Use the correct syntax: Instead of using
items()?['[email protected]'], you should first ensure that you are iterating over a collection. For example, if you are using aSelectaction, it should look something like this:Replace
'Your_Previous_Action_Name'with the actual name of the action that outputs the collection you are working with. This should resolve the error and allow you to retrieve the formatted value correctly.If you continue to face issues, double-check the output of the previous action to ensure it contains the expected data structure.