• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Log in
  • ☰
  • Solutions
  • Forums
  • Tickets
New Topic
Discussions Q & A Recipe Building
A

Anandit Joshi

started a topic 11 months ago

Removing Dupes from CSV

Hi Is there a way to remove duplicate records while composing a CSV?

Amanda Wong

said 10 months ago

Hi Anandit, 


If you have an array of items e.g. ["apple","apple","apple","pear","banana"], you can use formula .uniq to extract unique values from the array i.e ["apple","apple","apple","pear","banana"].uniq returns ["apple","pear","banana"]. This is a simple example that you may expand on.


To transform the array to a list data pill for use in a source list field, you can create a list using a combination of the following actions


1) Using Workato List app, create a list of size equal to no. of unique items in array

2) Using Repeat action, iterate through list in (1) i.e. iterate 3 times

3) Using Append item to list action nested in Repeat action, create a new list, adding each unique item in each iteration --> this creates a new list data pill you can map in the source list field when composing csv




Screenshots of Recipe input:


1) Using Workato List app, create a list of size equal to no. of unique items in array




2) Using Repeat action, iterate through list in (1) i.e. iterate 3 times




3) Using Workato List app, Append item to list action nested in Repeat action, add each unique item in each iteration --> this creates a new list data pill you can map in the source list field




4) Mapping source list field with the list data pill created in (3)



Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Expert Hour
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
Workato 2018 © | Privacy | Terms | +1 (844) GO-WORKATO
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato