I am trying to build a global js function function getArticleRate(rateType, articleName) that I can call in the app. This function needs to use data from a query getArticlesRatesQuery that I defined ahead of time.
Steps:
I keep getting a message that "'getArticlesRatesQuery' is not defined." in my global js function, even though I can refer to the query in the rest of the app.
Hi @Philippe_Mizrahi and @TravisM, to achieve this, we need another parameter for the JS function to pass in the query as an argument. Although functions from the App's preloaded JS can't access predefined queries, they can take them as an argument and trigger them within the function.