How can I dynamically modify the second dropdown based on the first selection in Jira Insight CMDB?

In Jira Insight CMDB, selecting a Company should auto-filter the Employee dropdown. My alternative AQL fails:

record_entry with filterLinks(linkType=‘OrgRef’, relationType IN (‘IsMember’))

I dealt with a similar case a while back. I found that a viable approach was to enhance the Insight behavior by using custom scripting that listens for changes in the primary field and then applies a modified AQL query on the secondary dropdown. The idea is to capture the company selection and dynamically build your AQL filter with the related employee records. It required a bit of JavaScript to handle the event and trigger the API call that refreshes the second dropdown’s contents, but it ultimately yielded a more responsive and user-friendly interface.

In my experience, the key to solving this was to build a mechanism that listens for changes in the first dropdown. I accomplished it by creating a script that captures the change event and then rebuilds the AQL query for the second dropdown to reflect this selection. My approach involved asynchronous API calls to update your secondary field dynamically without needing a full page reload. It required some trial and error to adjust the query parameters correctly, but the final solution was both responsive and effective for our use case.

hey, i used insight automation to link the two fields. a dropdown change triggers an update via built-in filters instead of heavy js. it was simpler and saved a load of time. hope it helps!

Based on my experience, a robust solution was to embed a custom trigger within the Insight automation process. This trigger was set up to detect changes in the company drop-down before constructing a refined query. Instead of solely relying on client-side scripts, I opted to implement a server-side routine that recalibrated the filtering process for the employee field. With careful testing, I integrated both client and server functionalities which maintained real-time integrity between fields under varying conditions. It required some debugging initially, but the overall implementation significantly enhanced the responsiveness and accuracy of the dropdown filters.

My approach was to integrate a server-side filter within Insight’s automation setup instead of solely relying on client scripts. I crafted a subtle interaction between the fields by modifying the AQL query server-side each time the company selection was updated. This method required setting up a lightweight routine that listened for changes in the primary field and then dynamically applied a refined query to the employee dropdown. It took several iterations to refine the process, but eventually proved efficient by reducing client overhead while keeping the interface responsive and consistent.