Help Desk

Submit a ticket My Tickets
Welcome
Login

Iteration on Empty Set

I have a process that cleans up old files by iterating through and deleting them. As there are multiple steps in the delete process it is handled within a group. The problem I have is if there are no files, the chain fails, and I cannot simply set the runtime to success. Is there a way to check the count on a JSON set returned from a BizApp command so I can do conditional processing?

  • Hi Mike,

    Yes you can use a conditional and check the JSON object.  I don't have the syntax off hand but if you add a List File Contents preview to the Chain after the JSON object is created for a known blank condition, you can see the output.  I believe it is [].  In the Conditional, then you would simply check for the output of the CSV to JSON not equal to a blank object.  If that is successful, then you connect to the group that iterates and deletes the files.  

    Tony

Login to post a comment