Empty Array check

  • 123 Views
  • Last Post 27 March 2020
  • Topic Is Solved
m.pessemier@faktion.com posted this 26 March 2020

How to check if a list is empty in a decision node?

Order By: Standard | Newest | Votes
alphonsa@intellibot.io posted this 26 March 2020

Hi Pessemier,

To check whether the list is empty or not , you can use count method as shown below.



Thanks & Regards,

Alphonsa.K

m.pessemier@faktion.com posted this 26 March 2020

Perfect, thanks!

m.pessemier@faktion.com posted this 27 March 2020

I'm sorry to come back to this but don't I need to set or say which list I want to use when asking for the count or when adding items to a list?

alphonsa@intellibot.io posted this 27 March 2020

Hi Pessemier,

No worries!!
Yes, we need to add the items to the list as shown in screenshots below or you can use AddList  method to assign the list data and then check the count. (Note: "List" is available under Connectors)






Thanks & Regards,

Alphonsa.K

 

  • Liked by
  • m.pessemier@faktion.com
m.pessemier@faktion.com posted this 27 March 2020

Yes but in the first example, how does the add item know to which list it needs to add an item?

alphonsa@intellibot.io posted this 27 March 2020

 

Hi Pessemier,

When you add "List" connector to Global Objects, you can define a name to the List. Similarly you can add multiple Lists (Ex: Let's assume 2 lists are created and named as "List 1" and "List 2" are created). When you want to add an item to a required List (Ex: "List 1"), you should select respective List ("List 1") in Global Objects and use the respective methods (Ex: Add method). So, item gets added to "List 1" but not in the "List 2". Hope this makes sense!!

Please find the link to  Documentation of Intellibot List  Connector for more information.

Thanks & Regards,

Alphonsa.K

 

  • Liked by
  • m.pessemier@faktion.com
Close