Forum Discussion
Anonymous
5 years agoNot applicable
Prevent Bing map API function from running/refreshing when the query is edited.
hello all, I created a function that calls the Bing map web service, it works great and gives me distance traveled and duration between my start and finish locations, however it is a bit slow. My...
- 5 years ago
Anonymous you cannot avoid the full refresh, as soon as you refresh, it is going to refresh and make that function call for each row.
mahoneypat
5 years agoMicrosoft Employee
In the step where you invoke your custom function, you can wrap it in an if..then..else, where it checks if the Distance column = null. If so, run the function and, if not, return the Distance column value.
Instead of "... each fnDistince([City1], [City2]) ...", try
"... each if [Distance] = null then fnDistince([City1], [City2]) else [Distance] ..."
Regards,
Pat
Anonymous
5 years agoNot applicable
Thank you, that looks like it will do the trick, I will try it and post the result and accept your solution.