I am trying to build an automation that will once every 2 weeks create a JSM issue. This issue will be populated with a list of objects that are 'due for calibration.'
I have been having a hard time figuring out how to utilize the AQL so that it will actually let me set the asset object field on issue creation.
My current implementation uses a FOR AQL loop to fetch a list of objects matching my AQL criteria (due for calibration in the next 60 days) and then my action is to create an issue and set the Internal Assets (custom object field) to the exact same AQL.
The result is I end up with as many issues created as objects are found, and each issue is identical with all assets linked in the issue.
I am trying to create only 1 issue with all matching assets (due for calibration). I have not been able to figure out how to break the loop, or use a condition and action, rather than the 'for each AQL loop'.
