Dropdown categories

Modified on Fri, 5 Apr at 1:02 PM

In case you would like to have an option, that based on a dropdown menu value would suggest different work items to link to your Risksheet.



- To do so, we should have the enumeration with needed categories created on the Polarion Administration level as normal.

- After that, we can add our enumeration dropdown to the risksheetTopPanel.vm file.

Cars:
<select name="cars" id="cars">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select>


- So in the end we'll see that Enum on the top panel.


- Now we need to create a query that will help the system understand, that we would like to see only items that have the same category as the one we've selected on the top panel.

...
"queryFactories":{
      "hazardQuery":"function(info){return ''+$('#cars').val();}"
    },
..


- And add this queryFactory to the column with the itemLink you have to filter, in your case Hazard.

..
 "id": "hazard",
 "bindings": "hazard.title",
      "typeProperties": {
        "linkRole": "assessedHazard",
        "linkTypes": "hazard",
              "queryFactory": "hazardQuery"
      }
   ..




As the result, in the dropdown menu the system will show you only items that correspond to the selected option, in this case 'Volvo'





In case of questions please contact [email protected]




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article