cancel
Showing results for 
Search instead for 
Did you mean: 

SAP IRPA: Set context issue

0 Kudos
724

Hello!

I have problem with filling context array by any values in custom project SAP IRPA and also with standart activity "Set Context". In debug mode error appear "TypeError,' ' is null or not an object"

Please, i need help!

Vladimir_Kosovt
Participant
0 Kudos

Michail!

while flexing with import of tables from MS Excel through IntRPA array variables, I was stunned with representation of indexes. Where I assumed [0] the IntRPA wanted [0, 0] for vectors (single strings or columns), and [0, 0, 0] for 2 dimensional tables. Have no clue what the first index mean tho. Write back if successful, cheers!

mine IntRPA is 1.08 trial btw.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

It looks like incorrect usage of array in standart generated code

The context is:

newFolder (as array)

  • -newItem (element, string)

ssign part must look like:

  • 1)Create object rootData_newFolder with newItem inside.
  • 2)Add this object to the array newFolder.

Seems like the standard code generated from workflow is not correct in this case:

rootData.newFolder[0].newItem = 10000;

But this code is working, for example:

// Set Context

rootData.newFolder[0] = ctx.dataManagers.rootData_newFolder.create(); rootData.newFolder[0].newItem = 10000;

rootData.newFolder[1] = ctx.dataManagers.rootData_newFolder.create();

rootData.newFolder[1].newItem = 11000;

Answers (1)

Answers (1)

0 Kudos

Hello Mikhail, maybe you have to write the code like following:

rootData.newFolder.newItem = 10000;

instead of:

rootData.newFolder[0].newItem = 10000;


Greets,

Aleks

0 Kudos

Hello, Aleksandar, thank you for your answer!

I actually try to fill array of "newFolder" with "newItem" values. In your proposed solution "NewFolder" is not an array, so i cannot fill multiple "newFolder" structures.

And also rootData.newFolder[0].newItem = 10000 in this case is standart generated code by "Set Context" activity, so its seems should work out of box properly.