Define your button Action as: Function, then select the GetImage function from the function name list. When that button is clicked, it will only run that fuction and will not affect any other buttons. Hope that helps
You have () instead of {} within the statement of the first if statement there, that would cause the function not to be evaluated and thus not show as available to select from.