Skip to main content
October 4, 2022
Question

executestoredprocedure function passing apostrophe in Inputs parameter

  • October 4, 2022
  • 8 replies
  • 0 views

Please let me know how do I pass apostrophe in Inputs parameter  for executestoredprocedure function

ocal!sp: fn!executestoredprocedure(
dataSourceName: "jdbc/DRO",
procedureName: "procCSS_Search",
inputs: {
{
name: "ssn",
value: ri!ssn
},
{
name: "lastname",
value: ri!lastName
},
{
name: "firstname",
value: ri!firstName
},
{
name: "caseid",
value: ri!caseId
},

{
name: "primaryCauseTF",
value: ri!primaryCauseTF
},
{
name: "causenum",
value: ri!causeNum
},
{
name: "oagnumber",
value: ri!oagNumber
},
{
name: "personid",
value: ri!personId
},
{
name: "phone",
value: ri!phone
},
{
name: "casestatus",
value: ri!caseStatusCode
},
},
timeout: 300
),

8 replies

stefanhelzle0001
Brainy
October 4, 2022

Use double-quotes to add a add a single quote to your text.

Example: "this "" is a quote"

Is this what you are looking for?

BTW, there are new function to execute stored procedures. Check this: docs.appian.com/.../Execute_Stored_Procedure_Smart_Service.html

Participating Frequently
October 4, 2022

I completely agree with stefan and for input parameter its good the use procedure inputs

'type!{urn:appian:plugin:executestoredprocedure:types}ProcedureInput'()

csteward
October 4, 2022

Other than Stefan's notes, from an Appian perspective this looks fine to me as there is nothing preventing a text-valued rule input to contain an apostrophe.  Are you able to call the procedure directly in the DB with apostrophe inputs?  And confirm the procedure is not parsing them out?

joseg199Author
October 4, 2022

Thank you all . I am new to Appian programming . This is what I am getting without apostrophe 

But with apostrophe getting incorrect syntax in error messages 

stefanhelzle0001
Brainy
October 4, 2022

I think this is an issue in the stored procedure and not Appian related.