I have List of dates A and List of dates B.
When a button is clicked, I need a workflow to be triggered only when “List of Dates A in not equal to List of dates B”.
Any body knows which operators can I use to set this condition?
Please note that I do not need the to check if count of dates of both lists are different, I need to check if the lists contain different sets of dates (the count is irrelevant for me).
If intersect :count = 0
First intersect the two arrays
Then count what’s left
Thanks for your reply.
Sometimes intersect might not be 0 but that does not means that both lists contain all the exact same dates.
That is why I said that counting the dates will not work.
Sorry, maybe I’m misunderstanding. You want to make sure that no dates from list A are in list B ? Right?
I think you don’t understand the :intersect function.
Intersect will take one list and compare to another list and only keep items that are in both list.
So doing that, if the :count is 0, this mean all items are differents.
Intersect count between this two lists will not be 0. However, this lists are not the same.
That is what I need to identify. Lists that don’t contain exactly all the same elements although they might have elements in common.
Add first: count nb of dates, if equal, intersect?
The issue is different here because you have a different size list.
Option A) Take the longest list and use minus list with the smallest one. If the count of the longest list is < than the result, this mean there’s a date in both list. But… this solution will need you to check which one is the longest first
Option B) More complex, but will work fine with any kind of list. You will use first list (any of the two list is fine):format as text (in the text to show per list item do: second list doesn’t contain this date) and set a delimiter (,):contain “no”
If the result is no, date are all differents. if the result is yes, this mean a date (or more than 1) is in the other list.
Example here: Your Bubble app
Just enter CSV list of date like I did and you will see yes no under the input updated if there’s two similar year
This topic was automatically closed after 70 days. New replies are no longer allowed.