Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I'm trying to pull the data from the newest Jira cloud API (v3) and they produce a json that looks like this:
{
issues: [
1,
2,
3
],
nextPageToken : "string"
}
nextPageToken is nullable, that is it is absent on the last page of the result.
I'm having trouble with the function that gets the next page which looks like this:
// Function to fetch data using next page token
FetchJiraData = (NextPageToken as nullable text) =>
let
ApiUrl = if NextPageToken = null then
BaseUrl & "jql=project=myproj&maxResults=" & Number.ToText(PageSize)
else
//NextPageToken, // Use nextPage URL
BaseUrl & "jql=project=myproj&maxResults=" & Number.ToText(PageSize) & "nextPageToken=" & NextPageToken, // Use nextPage URL
Source = Json.Document(Web.Contents(ApiUrl, headers)),
Issues = try Source[issues] otherwise {},
NextPageToken = try Source[nextPageToken] otherwise null
in
[Data = Issues, NextToken = NextPageToken]
When calling the function, I get
Expression.Error: We cannot convert a value of type Record to type Function.
Details:
Value=[Record]
Type=[Type]
Any help will be appreciated!
P.S. I did try both ChatGPT and Copilot and neither helped.
Thank you!
Hi @InnaS ,
Thank you for reaching out to the Microsoft Fabric community.
We suggest trying this alternative approach in place of your current function. It has proven effective for some users, but we'd love to hear if it works for your specific case. Please give it a try and let us know if you require any further assistance.
If my response solved your query, please mark it as the Accepted solution to help others find it easily!
And if my answer was helpful, I'd really appreciate a 'Kudos'.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
15 | |
13 | |
12 | |
11 |