Call store procedure in Name query

I defined a store procedure in my database ,and tried to call the procedure in name query , and use system.db.runquery get the name query ,but got an error saying project not found the query , if I changed the query , just selecting some columns instead of calling my procedure , it works , so may I know if ignition supports a name query of store procedure ? I know ignition have other scripting to call the procedure in scripting , it works ,but I am wondering if I could use system.db.runquery to call it ?

Thank you

If you’re trying to call a named query you want to use system.db.runNamedQuery not system.db.runQuery.

To call a stored procedure directly from the database, you can’t use system.db.runQuery, you need to use system.db.createSProcCall and
system.db.execSProcCall like the example in the documentation

call = system.db.createSProcCall("start_batch")

Theres also a way to register in and out parameters after you do the createSProcCall.