cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Looping through a lookup table and taking different actions per result

tara1
Deputy Chef II
Deputy Chef II

Hello! I am looking for the best approach to this. I have an array of products. I loop through the array looking to product matches to those in my lookup table. As there are matches, I am creating Jira Issues of different types and in different projects. This seems like a use case for custom coding or a custom action. Doing this inline for 6-7 potential matches is a bit unwieldy.


I am hoping to get some opinions. Thanks in advance if you have some thoughts!


UPDATE: I am posting what I did for the next person who may wander by.

I added the Jira Project Key and the Issue Type Name to the Lookup Table for each SKU. Then, when I created the Jira Issues, I used the Data pills from the list to populate the Project/Issue Type field to make that dynamic:



Then, I selected a Task Type from the drop-down list so that the custom fields that are in that project will be available for mapping:



It is working beautifully. A repeatable action (for each loop) is checking a dataset against the lookup table and creating the correct type of Jira issue for each match.

8 REPLIES 8

jblanchett
Deputy Chef III
Deputy Chef III

I would try to make a single "Create JIRA Issue" callable recipe or action in Workato that simply takes variables in as inputs and creates the JIRA ticket properly based on the product type.


For example

Product Type 1 --> Create Story in Project1

Product Type 2 --> Create Task in Project 2

etc



You could use lookup table(s) to make the association. Your recipe then becomes something like this


- Get Product Type

- Search Lookup Table for Product Type's JIRA Attributes

- Create JIRA Ticket associated with Attributes


This is much more manageable than doing an IF condition for each product type. Your recipe will get really long if you go that route.

This a possibility if I store enough info in the lookup table to draw from - which is entirely possible. Thanks! I'll explore that. ๐Ÿ™‚

llaryea
Deputy Chef I
Deputy Chef I
@tara You could create a dynamic master mapping table with all of the various permutations required.  You can then index match the [input] against this table (which should expand and contract) according to the addition and removal of each product.  The output should then feed into the Jira table.    

-- ---------------

Tara Rowell have you considered loading both sets into a collection so you can execcute SQL against them as joined tables?