Forum Discussion
j_angelevski
4 years agoContributor III
Glad that it is working now. But the reason why !$.isEmpty()
doesn’t work it’s because:
- When the input is empty -
{}
, the expression!$.isEmpty()
will return false because you are checking first if the input is empty ( which is true ) but you are making it false ( with the!
sign ) and in the end the Router won’t output anything. It’s essentially like saying"Check if input is empty, and if it is, stop the flow of the data ( which in this case it should continue to another output instead of stopping )."
- You can also solve this with the following Router settings
The first expression will return true if the input data is not empty ( it will output the input data to the first output view ), and the second expression will simply returntrue
and will output the data on the second output view. With theFirst match
option checked, only the first expression that returns true will be evaluated to the output even if there are more expressions that return true.
MikeP
4 years agoNew Contributor II
Smashing thanks for the additional information, good knowledge to know.