I need the correct format to create inputs when calling the Execute Stored Procedure plugin from an expression rule. Here is my entire rule. I want to send an integer as an input (and ri!num is an integer) into a stored procedure and retrieve the results as the dataset is too large for Appian to handle comfortably.
a!localVariables( local!spResult: fn!executestoredprocedure( dataSourceName: "jdbc/Appian", procedureName: "jsonValTest", inputs: { id: ri!num } ), local!result: if( local!spResult.success, local!spResult.result[1], local!spResult.error ), local!result )
The SQL query when run as a query minus any parameters works. Have I fouled the SQL procedure or do I have the syntax wrong on the execute stored procedure (or both)? Thanks in advance.
Discussion posts and replies are publicly visible
The syntax to pass the inputs looks incorrect to me -
a!localVariables( local!spResult: fn!executestoredprocedure( dataSourceName: "jdbc/Appian", procedureName: "jsonValTest", inputs: { {name: "id", value: ri!num} } ), local!result: if( local!spResult.success, local!spResult.result[1], local!spResult.error ), local!result )
Refer to the documentation file of the plugin
community.appian.com/.../execute-stored-procedure
Thank you! This formatting worked perfectly for what I need.