cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
476
Views
2
Helpful
4
Replies

Adding row to a table

I3udder
Level 4
Level 4

I did use an API request to get data from Infoblox about a subnet. This data throws me back an array for the members assigned to the network object. I can easily transform this to a table within workflows and ticked persist table.

Now I want to add a row to this table. Used add row to table for this. I can fill this data nicely.

But when I want to call the original table which I presume now has the added row, it still has 2 rows instead of 3. I want to use this array to construct the data for updating the assigned members of an InfoBlox network.

I probably can resolve this via Python ofcourse, but would prefer to use the Table activities for this.

Table is presented lik this :

 

[
{
"_struct": "dhcpmember",
"name": "member1.guest.com"
},
{
"_struct": "dhcpmember",
"name": "member2.guest.com"
}
]

I want to add: 

{
"_struct": "dhcpmember",
"name": "member3.guest.com"
}

 

Any Idea?

1 Accepted Solution

Accepted Solutions

For those following this thread for hints on how to troubleshoot tables, here is a tip.
Add a For Each Loop after a Add Row To Table activity. Use the output of the Read Table From Json...Output array as the Source Array for the For Each Loop. You can leave the For Each Loop without any activities in it. when you run your workflow, in the View Run Details, when you click on the For Each Loop, you will see the Source Array with all the data values for all of the Rows in the Table and you can validate that your Table has the added Row.

Network Platform Team
Workflows - Technical Marketing Engineer

View solution in original post

4 Replies 4

@I3udder This should work, I've used Add Row to Table a few times. Could you share a picture of your workflow canvas and the properties of the Add Row to Table activity from your workflow run? For the Table section of Add Row to Table, do you see the New Row? In the Output section of Add Tow to Table do you see a count for Added Row Count and Succeeded as True?

 

 

Network Platform Team
Workflows - Technical Marketing Engineer

I3udder
Level 4
Level 4

Did send you a private message with the screenshots.

Jeroen Vercoulen

For those following this thread for hints on how to troubleshoot tables, here is a tip.
Add a For Each Loop after a Add Row To Table activity. Use the output of the Read Table From Json...Output array as the Source Array for the For Each Loop. You can leave the For Each Loop without any activities in it. when you run your workflow, in the View Run Details, when you click on the For Each Loop, you will see the Source Array with all the data values for all of the Rows in the Table and you can validate that your Table has the added Row.

Network Platform Team
Workflows - Technical Marketing Engineer

I3udder
Level 4
Level 4

After I saw the addition of the row was correct I explored the select from table activity. This made sure I could select everything from the table. This produces the correct array I can use for my Infoblox Member update. Now I can easily add or remove InfoBlox members where a network is assigned to.