Filter
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How do I add a filter that picks up data that "Contains Total" OR "Is Null" / No Data Found.
I have 2 inputs, one will sometimes be blank, but will sometimes contain a row Total that I need to use. Currently no NULL data is coming in, it is just not bringing any data in because the worksheet is blank and therefore it is causing my basic "Filter" icon for "Filter for if Contains Total" to error out my workflow. It says "No Applicable Data Found."
Solved! Go to Solution.
- Labels:
- Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@NBPSE
You are getting the error as no data is passing through, try the following, add Text Input with the headers only and then union the data, in this way there will always be a field that the filter can be configured.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I did not try if it will work, as you might get error at the union if no data will flow from the file, but at least you can try if it will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This did not work when I tried it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This will work, just do not forget to remove Count later on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Are you able to upload this workflow? I am not sure how this is creating data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@NBPSE
I cannot do that, just add the parts that are missing at your WF compared to the snippet that I uploaded.
Just to clarify it, it is not my private license therefore will not be able to share any WFs, can share snippets and add explanations. I do believe that you have a WF in place, I added 3 tools, Text Input, Count and append, you should be able to manage it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I was wrecking my brain on this a few years back when needing to send an automated email, if a file was read empty.
There is a super simple trick using the same logic as @OTrieger suggested.
But one major difference:
- in your dummy files, do not just include the headers and nothing with it. It won't work as you already saw
- What you need to do is to add at least one row in that dummy file, something like "No Data" or "File Empty"
- What will happen now that if your data file is empty and you union the dummy file, which will always have 1 record saying "No Data", it will ALWAYS run the flow.
I did the following and it worked flawlessly:
- union your dummy header file to your data + have a 1 record in it saying "No Data"
- Add record ID
- Summarize tool will help you find the MAX value of that record ID
- Append this maxvalue to your data with Append tool
- Now you have your original data and also a column, which tells you how many records you have
- Add filter where you tell it to only pass records where:
- Max Record ID is > 1 and Org column is different != than "No Data"
- What this does is: if there is no data and only the headers are pushed, your result will say No Data
- if there is data in your file, then the No Data first row will be hidden and only your live data will be passed
I used this before and it works perfectly. It helped sending me emails to alert my customer to let them know that their source file came in empty that night.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This was a fix that worked for me, thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I received a message from you @NBPSE, but when I went to this discussion it just vanishes.
If I understood correctly, you want to do a join afterwards and want to get rid of the NO DATA row, if there indeed is data.
All you have to do here is to add a filter to look for a value NO DATA in the column
This filter tool will split your flow into two branches
- T anchor will send it to the situation where there was no data and only a row with a value NO DATA will be there
- F anchor of the filter will have a situation where there is NO DATA row + actual data - this is the one you want
So, either way that last filter will show you either NO DATA or will show the actual data itself and you are golden from there onwards
Either of the branches may need some sort of action - send email, write a file, etc...
Just because there was no data doesn't mean nothing happens - you can still write an empty file with hardcoded text in it, etc...
