Skip to main content
swapnar6405
May 3, 2023
Question

Execute store procedure result set error

  • May 3, 2023
  • 13 replies
  • 0 views

Hi,

I am using a Execute Stored Procedure smart service and it is returning 2 result set and each result set is returning with multiple values.

Now, when I try to grab the store procedure output  result into a variable like below, I am getting an error.

An error occurred while evaluating expression: keys:AC!ResultSets[0] (Invalid index (0) for list: valid range is 1..2) (Data Outputs)

13 replies

May 3, 2023

The error message is pretty clear that you are trying to index at 0 position but the valid indexes are 1 and 2, use ac!ResultSets[1]

stefanhelzle0001
Brainy
May 3, 2023

The first item in an Appian list or array is at index 1, not zero.

swapnar6405
May 3, 2023

I tried with index 1, error gone, but no luck with the values.

Below are the screen shots of my stored procedure output along with Appian PM. I am unable to capture these array of values. Anything wrong in my settings.

May 3, 2023

Can you store ac!ResultSets in a pv! and show us the value of that pv! in a new instance?