Home Analyst Portal

Conditional query results

Jeff_LandersJeff_Landers Customer IT Monkey ✭

I have searched old post but I don't think I have seen this.

We are trying to use a query of a custom class(es) ie. switch names and ports which is more than 10,000 objects and present the user with dropdowns of 1) the 251 switch names and then, based on that, present the user with the 2) the switch ports for based on the switch that was selected.

for instance, the user picks switch A, can we dynamically filter the query for the next user input to only present Switch A's ports?

We do custom CI's all the time, populate them outside of SCSM using powershell, and then query that in an offering but we are unsure of how to make this work.




  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    @Jeff_Landers - The DisplayName of the first prompt can be used as a token in any subsequent prompt.

    So in my example, my first prompt is called "Pick Something". That selected object's DisplayName can now be the criteria value for this User's department. Assuming there is a property on the switch ports that will match up with the displayname of your switch, it should work.

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭

    Also worth adding that the same logic that @Justin_Workman points out above, works with properties of Config Items. In that case, the key step is having a Type Projection that binds your Switches to Ports.

    Take the following Asset Management example, I have a list of Hardware Assets. When I pick one of them, the next prompt shows only that single Assets installed Software Assets. This was made possible through the Cireson Software Asset (Related Computers) Type Projection and using the Active Directory SID as the Token.

    If you need to build Type Projections, I highly recommend @Justin_Workman's Type Projection builder.

  • Jeff_LandersJeff_Landers Customer IT Monkey ✭

    @Justin_Workman Thank you for the help

    @Adam_Dzyacky Congratulations on your new position.

    The powers that be decided to use @Marker in the RO prompts to intercept the javascript and display the conditional user input dropdown that way. Are there pros/cons/advantages to this approach vs. what is described above? I just want to understand the options. Thank you both.

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭

    Thanks @Jeff_Landers!

    The disadvantage to the @Marker approach is that you'll have to potentially maintain (certainly at least test) your custom Javascript throughout portal upgrades. But the advantage of it is that you gain infinite customization opportunity in any number of web development scenarios.

    The disadvantage to the Type Projection approach is that you may have to build the Type Projection and then rework some of your Request Offering logic to support it. The advantage of this approach is that there really isn't anything custom about it. It would all work within the context of SCSM, ARO, and the Portal.

    Ultimately, I don't tend to think of this in terms of advantage vs. disadvantage or even right vs. wrong. More so, I view this as "which is the solution that best serves your needs?"

Sign In or Register to comment.