โ12-28-2021 01:51 AM
Hi,
I want to compare the values coming from Union Snap. Iโve two input views, both returning the count of documents. Using Filter, I want to check if the count from both sources is similar then apply the following logic, but Iโm unable to compare the values between two documents. Can anyone help me create the expression please? In my case there will be only two sources.
Solved! Go to Solution.
โ12-28-2021 02:11 AM
Since they are separate objects, you have to find a way to combine them into one.
Instead of Union, you can use Join with the following configuration:
This will merge both objects into one, then you can easily check if countbefore is equal to countafter with the Filter: $['$countbefore'] == $['$countafter']
Or, you can use an inner Join instead of the combination with Join + Filter:
If their values are the same, there will be an output.
โ12-28-2021 02:04 AM
Hi @mayank.singh,
By โsimilarโ count do you mean โsameโ value in both objects ?
โ12-28-2021 02:05 AM
Hi @j.angelevski, Yes same value
โ12-28-2021 02:11 AM
Since they are separate objects, you have to find a way to combine them into one.
Instead of Union, you can use Join with the following configuration:
This will merge both objects into one, then you can easily check if countbefore is equal to countafter with the Filter: $['$countbefore'] == $['$countafter']
Or, you can use an inner Join instead of the combination with Join + Filter:
If their values are the same, there will be an output.
โ12-28-2021 02:17 AM
Thank you very much