- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
02-16-2021 02:37 AM
Hello All
In my Playbook I run into an issue with empty returns.
My Playbook requests Cherwell with several hosts in an array: ["server-A","server-B"]
In Cherwell, "server-B" does not exist, so I do see that in the "Result Tab" of the Task, but the Output is only from the one Host (server-A), which is in the Cherwell DB.
The reason is, that I have to fill out later some other DB. And they fill me in both Servers (server-A and server-B) the same one content from Cherwell.
How do I avoid "empty" fields?
I'm looking for something like (If output = "no result" then ...)
But this must happen in the Cherwell-Task.
To understand:
Cherwell-Task:
Input:
["server-A","server-B"]
Result:
dbot request server-A:
a Table with contents of server-A
dbot request server-B:
"no results"
Output:
Next Task I see:
for [{"server-A","server-B"}] insert [{ cherwell-output }]
and cherwell-output contains only info from one server (server-A)
and this Task inserts the content of server-A in both targets (server-A and server-B)
How may I bring this "no entry" into this whole loop?
I hope my question is clear... 🙂
thanks
roger
06-15-2021 01:51 AM
Hi,
By default if you query for something that wasn't found- it won't be written to the context, it is like this in pretty much all the integrations,
the Cherwell result should include the host name which you can use to verify if you got anything back regarding that host,
for example if you have an input of 10 hosts, but only some returned data from Cherwell; you can have a task\playbook that will loop the input host names one by one, and will check if it exists in the Cherwell response, if so it will write the data to the other DB, if not it will continue to the next one,
thanks.
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!