Insight Lookup objects in automation module

Krzysztof Hotiuk March 20, 2022

Hi, 

In automation module, there is a Lookup object to filter objects from Insight.

I have a custofield with id 10073 and name "User Name". this is a Inside's type custom field type

Object type name is  "UserList"

I need to find this one, where a "Name" attribute equals with value in custom field.

 

in Query I wrote: 

objectType="UserList" and "Name" = {{issue.User Name}}

or:

objectType="UserList" and "Name" = {{issue.customfield_10073.value}}

and other combination..

 

all cases I've tried ends with error message:

{"errorMessages":["IQL \"objectType=\"UserList\" and \"Name\" = and objectSchemaId == 5\" has invalid syntax at position 39 with error message \"extraneous input 'objectSchemaId' expecting {<EOF>, ' '}\""],"errors":{}}

 

(or similar)

What is proper syntax or how to get results I need?

Thanks, 

Krzysztof

 

 

1 answer

0 votes
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2022

Hey @Krzysztof Hotiuk ,

As you can see in the error the IQL you are trying to get to is resolving to:

IQL \"objectType=\"UserList\" and \"Name\" = and objectSchemaId == 5\"

meaning that your customfield value is not being pulled/resolved.

Since customfield_10073 is an Insight custom field I would suggest trying to use:

{{issue.customfield_10073.label}} or {{issue.customfield_10073.Name}}

Krzysztof Hotiuk March 20, 2022

Hi @Dirk Ronsmans

Thanks for your answer.. yes, it works now! 

 

next question related smart values...

 

from object a need get value from attribute "Email" and to new object only prefix.

ex. Email attribute value is: kh_makii@makii.pl

in new object I need only: kh_makii

I've tried with this:

{{lookupObjects.Email.substringBefore("@")}}

but.. dosn't work :(

 

any Idea? 

Thanks

 

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2022

is the lookupObjects actually returning something and if so what?

i would suggest doing a "log" action and go step by step. First output the full attribute to be sure that it returns something and then start cutting it up.

Like Bill Sheboy likes this
Krzysztof Hotiuk March 20, 2022

lookupObject.Email works fine. I can see all email address in log as expected.

but {{lookupObjects.Email.substringBefore("@")}} is empty :(

 

 

Thanks,

Krzysztof

Krzysztof Hotiuk March 22, 2022

Hi there, 

 

Any other suggestions / ideas ? :)

 

Thanks,

Krzysztof 

Jennifer Luo August 9, 2022

Hey Krzysztof,

You can try {{lookupObjects.Email.split("@").first}}

Suggest an answer

Log in or Sign up to answer