cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Caramba87
New Member

Define tracked properties for Power BI dataset refresh

Hi everyone, 

 

I want to define Tracked properties for refreshing a Power BI dataset.

 

Unbenannt.PNG

The output structure is as follows if the refresh is successful:

 

 

{

   "statusCode": 200,

   "headers": {

      “Pragma": "no-cache", 

     .... 

  } 

 

I am able to get the status as tracked property by using :

 

"@outputs('Refresh_a_dataset')? ['statusCode']" 

 

 

When an error occurs the outputs are as follows :

 

 

 

{

 

   "statusCode": 400,

 

   "headers": {

 

      “Pragma": "no-cache", 

 

     .... 

 

  }, 

   "body" :{

      "error" : {

         "code": "Invalid Request", 

         "message": "Error message..." 

        } 

     }

 

2021-12-16_08-55-45.jpg

 

 

 

Now if I am trying to get the 'message' or any other content from 'body' the output via Compose: Actions('Refresh_a_dataset').trackedProperties['Error']) or Actions('Refresh_a_dataset')?['Error'] remains empty 

 

What would be the correct way and syntax to get the message as tracked property in this case? Accesing the "statusCode" works:

 

2021-12-16_09-15-17.jpg

 

Thanks for your help! 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Caramba87 ,

 

Please try this:

outputs('Refresh_a_dataset')? ['body/error/message']

 

Best Regards,

Wearsky

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @Caramba87 ,

 

Please try this:

outputs('Refresh_a_dataset')? ['body/error/message']

 

Best Regards,

Wearsky

Hi @v-xiaochen-msft ,

 

unfortunately also no success with this approach. I´m stll just getting output for the "statusCode".

 

Edit:

 

Your solution was correct. I could access the tracked properties via composing Actions('Refresh_a_dataset')?['trackedProperties'] - then I´ve been able to read both properties using the outputs of the compose action: outputs('Compose_properties')?['Error']

 

Best Regards,

Caramba87

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,438)