Skip to main content
jaideepb0002
May 30, 2022
Question

Activity Class Parameter - Usage of Index vs dot

  • May 30, 2022
  • 10 replies
  • 0 views

Hi, I am trying to save the values of an activity class parameter in a variable inside a node. 

In the expression of custom output AC!Variables.restaurant works and passes values correctly to the target process variable. However when I try the same with index(ac!Variables,"restaurant",null) it does not work and passes null values to the target process variable which subsequently errors out down the line. 

I have tried several times but 'dot' works and 'index' does not.

Of course not a big deal but I would prefer using index than dot. Anything I am doing wrong?  or shall I raise this with Appian Academy?

thanks

jaideep

10 replies

gopalk2865
Participating Frequently
May 30, 2022

Hi Jai, Have you tried property() function ? 

jaideepb0002
May 30, 2022

no I haven't, I will give it a try. Thx Gopal

stewart.burchell
May 30, 2022

It's hard to tell from what you've provided what structure you're expecting to be returned in ac!Variables. Without insight into this we cannot advise as to how to address the 'restaurant' attribute in the structure.

jaideepb0002
May 30, 2022

sorry..

After I run the BOT, AC!Variables has this

{restaurant=[restaurantID=1, restaurantName=True Food Kitchen, restaurantStatus=Status: Permitted, inspectionDate=6/19/2396], healthDepartmentWebsite=https://inspections.myhealthdepartment.com/va-arlington}

If this helps - This is from the RPA tutorial. 

thanks

jaideep

stewart.burchell
May 30, 2022

What data type is your target 'restaurantList' ? Are you able to share the datatype?

harshitb6843
May 31, 2022

Tro to re-create the same scenario in an expression rule with the same rule inputs. 
You can try to implement various suggestions like using property() or flatten() the value. Also, you will be able to check the execution of the expression. 

jaideepb0002
May 31, 2022

good idea..thanks Harshit..I will try