Adding "New query" Features in Modal Button Action Query

It would be best if I can add new query on action button rather than having to add manually from the new resource button. Thanks