Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Assets - Unable to use lookup table get() using loop.count

Kyrah Johnson
Contributor
February 6, 2026

Hello,

 

I have an object with the following attributes:

- Manufacturer: text

- Model: text

I am trying to create a loop to iterate through a lookup table containing brand names in order to set a "Manufacturer" attribute on an object when created. On the .csv to import into Jira Assets, the Manufacturer and Model of an asset are combined and imported under just "Model". I would like to use a loop and an if statement to check if the imported "Model' attribute contains a brand name listed in my lookup table, and edit the 'Manufacturer" attribute to reflect that brand.

I am not able to edit the .csv to not combine the make and model, this needs to be done on import with Jira.

 

Here's what I have so far:


Test object being created:

Manufacturer: 

Model: HP LaserJet 1234


TRIGGER: Object Creation

  • -- BEGIN LOOP: No conditions, 3 loops are set
    • -- Then: Create Variable
      • Variable Name: assetModel 
      • Smart Value: {{object.Model}}
    • -- And: Create Lookup Table:
      • Lookup Table Name: assetManufacturers
      • Key: 1 | Value: HP
      • Key: 2 | Value: CANON
      • Key 3 | Value: BROTHER
    • -- And: Create Variable:
      • Variable Name: assetManufacturer
      • Smart Value: {{assetManufacturers.get(loop.count)}}
    • -- IF: {{assetModel}} contains {{assetManufacturer}}
      • Then: Create Variable
        • Variable Name: assetMake
        • Smart Value: {{assetManufacturer}}
      • Then: Edit Object 
        • Attribute: Manufacturer
        • Value: {{assetMake}}
      • ELSE
        • Nothing
  • -- END LOOP

This automation rule edits "Manufacturer" attribute of the created object to be blank on all three loops.

If I change the assetManufacturer smart value to be
{{assetManufacturers.get(1)}} instead, it sets Manufacturer to HP as it should, but I need it to check all three in the lookup table based on which loop iteration it is at to check each value.

 

I have tried the following as the smart value and have either gotten errors or Manufacturer set to empty:

-- {{assetManufacturers.get(loop.count)}} -> empty value

-- {{assetManufacturers.get({{loop.count}})}} -> error: Unable to render smart values when executing this rule:
Failed to get value for assetManufacturers.get({{loop.count

 

If this is the complete wrong way to go about this, please let me know, I am willing to change this entire rule in order to get the functionality of iterating through the lookup table, checking the values, and editing the attribute if a match is found with that match.

2 answers

2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 9, 2026

Hi @Kyrah Johnson 

Adding to the suggestions from @Trudy Claspill ...

If you still want to use the lookup table as the source of matches, you could try:

  • create the table
  • remove the branching
  • use the table's entries function to extract just the values to build a dynamic regular expression using list iteration 
  • use the match() function with the dynamic regular expression to find any matching manufacturers, and use that for the update

 

Kind regards,
Bill

2 votes
Trudy Claspill
Community Champion
February 8, 2026

Hello @Kyrah Johnson 

Welcome to the Atlassian community.

It does not appear that {{loop.count}} is a smart value you can use within the loop to determine which iteration of the loop is running, as per the documentation

These values are stored in the loop’s internal state and updates only when the loop completes execution. 

Is there a specific reason you are trying to implement this with a Loop and Lookup Table?

An alternate method would be to use and IF/ELSE structure. Here is the basic structure. Where I inserted a Log action you would insert your Edit Object action. You don't need to use all the Create Variable actions.

Screenshot 2026-02-08 174706.png

Kyrah Johnson
Contributor
February 9, 2026

I was hoping to use the lookup table and loop to make it easier to add more brands in the future if necessary, but I may be over-complicating it. Thank you for the information!

Like Susan Waldrip likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events