Ronaldo Nascimento · Aug 20, 2025 go to post
import iris

address = os.environ['IRIS_HOST']
port = int(os.environ['IRIS_PORT'])
namespace = os.environ['IRIS_NAMESP']
username = os.environ['IRIS_USER']
password = os.environ['IRIS_PASSWD']
# TODO: change to %SYS namespace programmaticly, save the original
# namespace and revert when done
namespace = "%SYS"
connection_string = f"{address}:{port}/{namespace}"
logging.info(f"connecting to: {connection_string}")
connection = iris.connect(connection_string, username, password)
logging.debug(f"{connection}")
cursor = connection.cursor()
Ronaldo Nascimento · Aug 20, 2025 go to post

Im not using embedded python, but a script using the intersystems-irispython module. So the iris object has no method `execute()`

Ronaldo Nascimento · Jul 15, 2025 go to post

I figured it out, I had misspelled the form's action class reference. Once I corrected it, the page acts as expected.

$D(%request.Data("action",1)) worked, I was able to determine which of the submit buttons was pressed. Thank you!

My bad I forgot to add the ,1 in the Data method. It still crashes and gets an Undefined error.

Set action = $Get(%Request.Data("action", 1), "")