Forum Discussion
msellner_1025
3 years agoHelper I
Use Result of Query 1 in Query 2
Hello! I have a query that returns a random file name that I need in order to download a csv formatted reported. Below is the power query that I have set up – it returns the file name as expect...
- 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
BA_Pete
3 years agoSuper User
Hi msellner_1025 ,
Right-click on your random file name cell and select 'Drill Down'. This will convert your table value into just a floating value.
At the start of your second query, declare this as a variable using just
'variableName = nameOfRandomFileNameQuery'.
Then you should be able to apply this variable in your code instead of the hard-coded file name.
Pete