Remove list values from another list

i have two lists for example
07:00, 07:15, 07:30, 07:45, 08:00, 08:15, 08:30, 08:45, 09:00
and
07:45,09:00
I want to remove the values from the second list from the first list like so:
07:00, 07:15, 07:30, 08:00, 08:15, 08:30, 08:45

Clarify if you’re using OB1 or OB2. If it’s OB1 it’s hard and I will not tell you how to do it because I don’t support it anymore. If OB2 then let me know and I will post a C# snippet to do this.

I just switched to OB2 papa ruri

Here is a simple example of what you want to do, using only blocks and LoliCode statements (without plain C#) so it should be easy to understand :slight_smile:

BLOCK:ConstantList
  value = ["07:00", "07:15", "07:30", "07:45", "08:00", "08:15", "08:30", "08:45", "09:00"]
  => VAR @list1
ENDBLOCK

BLOCK:ConstantList
  value = ["07:45", "09:00"]
  => VAR @list2
ENDBLOCK

FOREACH item IN list2
IF LISTKEY @list1 Contains @item
BLOCK:ListIndexOf
  list = @list1
  item = @item
  => VAR @index
ENDBLOCK

BLOCK:RemoveFromList
  list = @list1
  index = @index
ENDBLOCK
END
END