Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

How to get value in nested variable?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

How to get value in nested variable?

L3 Networker

Hi all,

I want to value in list and i use ${list.list_name.${account_name}} but this is what happens after running that ${list.list_name.realaccountname}.
How can i do that?

1 accepted solution

Accepted Solutions

L5 Sessionator

Hi @YilmazDincer,

 

As mentioned by @SanDev and @Josep you will need to load the list content into the context first. Before the task in your screenshot run the !getList listName=${account_name} extend-context=<contextKey>= automation. That will load the contents into the context. You can then call that content inside you task.

 

Thanks.

View solution in original post

7 REPLIES 7

L5 Sessionator

Hi @YilmazDincer,

The tokens will be replaced only once. You can use the !getList automation to get the list data first. 

Sir, I want to extract data from the list interactively with the account_name that comes here. I will search the interactively incoming data(account_name) in the list

Normally I load all the list in the context, and after any change I update the list again. Not the best way.

Are you trying to do this programmatically or within a playbook?

Regards


Adam

YilmazDincer_1-1665051938084.png

 

I think, i'll explain better as a screenshot. I'm using opsgenie-create-alert and in the "responders" , i want to use this structure to take Opsgenie team name. 

I think there's no way of using a list directly like you did. Something before has to be done.

L5 Sessionator

Hi @YilmazDincer,

 

As mentioned by @SanDev and @Josep you will need to load the list content into the context first. Before the task in your screenshot run the !getList listName=${account_name} extend-context=<contextKey>= automation. That will load the contents into the context. You can then call that content inside you task.

 

Thanks.

  • 1 accepted solution
  • 2941 Views
  • 7 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!