I have created a sub-playbook(which is running in a loop for multiple inputs) generating multiple files json's and csv's. I want to delete json's only and keep csv's for a single run and at the end of loop, I want only csv's.
How can I do that?
I have tried delete context and in "Key" field I am passing entry ID of the file but I am getting error i.e ID is restricted for Incident
and you are not invited.
I have the administrator level access.
The key argument of the command DeleteContext is expecting the context key name of what you want to delete,
providing "File" will result with all files being deleted, you can use index=0 argument as well to delete only the first file for example,
but to achieve what you want to do this command won't be enough.
What I find as the best solution so far is to simply reset the File context key only with the files you wish to maintain, overwriting those you don't want;
You'll need to run the "Set" command, with a key argument of "File", for its value argument you will need to use the Filters & Transformers;
1. Get = File
2. Filter = File.Extension "Equals" csv
This way the File context key will be recreated, only with csv files,
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!