admin管理员组

文章数量:1356878

I'm querying a Power BI dataset using Power Automate.

The query works fine - but when I check if the length of output is >0 (so I can determine whether to send a notification email or not), I receive the error:

Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Object'. Please see for usage details.'.

My flow is setup as:

My condition is setup as:

...and the error shows as:

I did also try:

length(outputs('Run_a_query_against_a_dataset')?['body/value'])

and

length(body('Run_a_query_against_a_dataset'))

Can anyone see what I've done wrong - I just want to check the length of "Run Query against a Dataset" - before I send an unnecessary email.

Thanks for your help,

Mark

I'm querying a Power BI dataset using Power Automate.

The query works fine - but when I check if the length of output is >0 (so I can determine whether to send a notification email or not), I receive the error:

Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#length for usage details.'.

My flow is setup as:

My condition is setup as:

...and the error shows as:

I did also try:

length(outputs('Run_a_query_against_a_dataset')?['body/value'])

and

length(body('Run_a_query_against_a_dataset'))

Can anyone see what I've done wrong - I just want to check the length of "Run Query against a Dataset" - before I send an unnecessary email.

Thanks for your help,

Mark

Share Improve this question edited Mar 28 at 15:40 Mark Tait asked Mar 28 at 15:24 Mark TaitMark Tait 6454 gold badges16 silver badges29 bronze badges 1
  • You’ll need to show us the output of the query step. Obfuscate and mask anything you don’t want us to see. – Skin Commented Mar 28 at 19:47
Add a comment  | 

1 Answer 1

Reset to default 1

Look at your output and you should see the node that is an array. It should be similar to:

length(
  outputs('Run_a_query_against_a_dataset')?['body/firstTableRows']
)

It should also be available in the UI as a Dynamic element.

本文标签: powerbiPower Automate running query against Power BI data set errorStack Overflow