Forum Discussion
Obtain an API key from one query to use in another
Hi Anonymous
The dynamic parameter preview feature is only supported for some DirectQuery data sources. It cannot be applied in your scenario.
As you can call the query to get a new API key, you can try using a query to get the key first and transforming the query to only return the key result (usually it is a text string). Then transform this query into a custom function. The result of the custom function is the key. In other queries, use this function to replace key string. As a result, when other queries need a key, they will call the custom function to query the key and get the result.
Here is an example which queries an access_token in a query and uses it in other queries then. The logic is similar. Have a try!
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.