Forum Discussion
Use Result of Query 1 in Query 2
- 3 years ago
Hi msellner_1025,
According to the format of what you say works the line should look like:
""fileName"":""" & Expensify_PullDataRequest & """Otherwise you either missing the "" ( ""fileName"":Expensify_PullDataRequest) or send Expensify_PullDataRequest as value instead of is_reconciliation_2816079167651847981.csv.
Cheers,
John
Does it work just as ""fileName"":csvFile ?
Sorry, I'm not great with API syntax so not sure what the valid options are.
If that doesn't work, can you send a screenshot of the Expensify_PullDataRequest query result please? It may be an issue with how this is being output.
Pete
I tried ""fileName"":csvFile and it returned the same error message. Below is the result of the Expensify_PullDataRequest query.
If I copy and paste this value into query 2 like ""fileName"":""is_reconciliation_2816079167651847981.csv"", it works great. I'm just not sure how to format this as a variable in power query.
Mikail
- BA_Pete3 years agoSuper User
Hmm, ok, that seems fine. This should be working 🤔
What if you skip the variable declaration and just go straight for ""fileName"":Expensify_PullDataRequest (and other variations of "E_PDR", ""E_PDR"" etc.)?
Pete
- msellner_10253 years agoHelper I
BA_Pete ,
Before submitting this post today, I was previously using ""fileName"":Expensify_PullDataRequest and any variation I could come up with. I worked on this for hours with no success. I thought declaring a variable would solve the issue, but it appears there is not a way to declare a variable in JSON body text using Power Query. I really want a solution for this now that I have invested so much time.
Mikail- jbwtp3 years agoMemorable Member
Hi msellner_1025,
According to the format of what you say works the line should look like:
""fileName"":""" & Expensify_PullDataRequest & """Otherwise you either missing the "" ( ""fileName"":Expensify_PullDataRequest) or send Expensify_PullDataRequest as value instead of is_reconciliation_2816079167651847981.csv.
Cheers,
John