Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
lg01
Helper I
Helper I

Pass parameter's values to a function from marked records

In my project I have a table created from a POST call to a REST service. The service populates the table just fine with fixed values passed to the service's paramenters. I then try adding my own paramenters to our function call in order to make it dynamic. The issue I have is that I want to pass values to the paramenters from marked record on the charts. So, for instance, say that I marked a record on a table or on a map, and that record has a key value in one of its columns. I want to call the function, pass the value of the key column in the record selected to the function and repopulate the table with the new payload coming back from the REST service. Below is the service call I use to populate the table:

 

()=>

let


body = Text.Combine({"{
    ""parameters"": {
     ""ItemId"" : ", inputIdParamenter, ",
     ""startDate"" : ", inputStartDateParameter, ",
     ""endDate"" : ", inputEndDateParameter, "
}
}"}),



Data=Json.Document(
              Web.Contents(
                      "https://mydomain.com/",
                       [
                          RelativePath="path/to/my/service/execute",
                     Headers=[
                            #"Content-Type"="application/json",
                             Authorization=GetAccessToken()
                           ],
                   Content=Text.ToBinary(body)
      ]
     )
),

well_data = Data[value]

in

well_data


 

2 REPLIES 2
v-xinruzhu-msft
Community Support
Community Support

Hi @lg01 

Based on your description, do you mean that you select the value in visual, then you need to pass the value from visual to the function?

 

Best Regards!

Yolo Zhu

Yes, that is correct. That is exactly what we are trying to do. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.