Problem with data output mismatch while using StoredProcedure in Database and Appian

Hi All,

I am facing an issue using a Stored Procedure. We have scenario where the SPROC need to fetch the records from the Database, lets say I have a UserID's - 25 & 35 who belong to same group "ABC" which is configured in database where UserID - '25' have 4 records and UserID - '35' have 6 records individually. The SPROC which was created has an input parameter 'UserID' and programID(common records based on based on programId given), When I call my SPROC with either of UserID(25 or 35) it should fetch all the records from both UserID records because they belong to a same group. Lets say when I call my SPROC with UserID - '25' it should fetch '10' records combining user's(25 and 35) as well and vice versa. And this works absolutely fine when I call it on my database MySQL Workbench.

Working fine as expected from DB side:
set @inUserID = 78;
set @inProgramID = 1;
call PDEVAppian.sp_GetQPRListByUserIDAndProgramID(@inUserID, @inProgramID);

But when I am using it on Appian by using 'fn!executestoredprocedure()' in an interface it is fetching only the UserID's individual records.
For example: fn!executestoredprocedure(
"jdbc/PDEVAppian",
"sp_GetQPRListByUserIDAndProgramID",
{
name: "inUserID",
value: ri!userId
},
{
name: "inProgramID",
value: ril!programID
}
)

when I pass UserID as '25' it is fetching only 4 records and when passed with UserID as '35' it fetches '6' records, in both cases it should actually fetch '10' records when either of UserID is passed as they belong to same group which is designed in StoredProcedure. Its working fine on Database but not working with fn!executestoredprocedure

Can someone please provide some thoughts on this, Thank you.

  Discussion posts and replies are publicly visible

Parents Reply Children