Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
How to define drop-down values for a field dynamicaly? Need a way to present different selection lists of the same field for different Requirement Documents. Like Colour (red,yellow,green) for one RD and Color (blue,green) for another. Any other ideas like playing with HTML code insertion?
Thanks
Solved! Go to Solution.
Here are my two examples:
1) Dynamic picklist based on IBPL with constraint
A few of our projects have variants, We have implemented that as a boolean on the Project type to flag the items that are variants of another one.
For example, project "ABC" has variants "Var1" and "Var2", so we have three Project items, "ABC", "ABC/Var1", and "ABC/Var2". Note: the common root is "ABC" which we call the Program, so we know all three project items belong together.
Our issue tracking system is designed to assign Issues to Projects, but if the project has variants, then you can also refine that by specifying which variants are affected, if any.
On the Issue type, we use an IBPL called "Variants" that allows to pick any Project items flagged as a variant:
But we want to select only the variants that are relevant for the selected project, so we add a constraint on the Issue type. Note that the picklist we use for projects is not the "Project" field, but another one called "Project Link". The constraint is:
Without going through all the details, the constraint essentially says "only select the variants that belong to the same Program but exclude the current project". For example, if our issue selects Project Link "ABC", then the two variants are shown. But if the Project Link is "ABC/Var1", then only the second variant is shown.
Examples:
2) Simple pick list with constraint
Our issues can be categorized, for example, if it's a Quality Issue, all possible values are defined here:
But on the Issue type, values are constrained based on some other field value used for further categorization:
I believe this answers the question "define drop-down values for a field dynamically?".
Note that no scripting (e.g. trigger) or "html code" are required.
Hi @AN_10548594
Thank you for your question.
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Also, feel free to add any additional information you think might be relevant. For example:
It sometimes helps to have screenshots to better understand what you are trying to do.
Best regards,
Hello Catalina,
Many thanks
For values that are truly dynamic, that is, the values cannot be predefined as picklist values, you should look at IBPL fields. You would have to define an item type to hold the values, and then the IBPL field allows you to have a dynamic picklist.
For values such as "Red", "Blue", etc., you would indeed use a picklist field. But then you should look at using constraints on the type(s) that uses it.
Note that you can also use constraints with IBPLs and also that constraints can be dynamic.
If you need more details, I'll try to find screenshots of our system where we have that kind of setup. Let me know if you need that.
Hello pal,
Would be very usefull if you could share these steps!
So far I'm starting to read docs :))
Regards
Here are my two examples:
1) Dynamic picklist based on IBPL with constraint
A few of our projects have variants, We have implemented that as a boolean on the Project type to flag the items that are variants of another one.
For example, project "ABC" has variants "Var1" and "Var2", so we have three Project items, "ABC", "ABC/Var1", and "ABC/Var2". Note: the common root is "ABC" which we call the Program, so we know all three project items belong together.
Our issue tracking system is designed to assign Issues to Projects, but if the project has variants, then you can also refine that by specifying which variants are affected, if any.
On the Issue type, we use an IBPL called "Variants" that allows to pick any Project items flagged as a variant:
But we want to select only the variants that are relevant for the selected project, so we add a constraint on the Issue type. Note that the picklist we use for projects is not the "Project" field, but another one called "Project Link". The constraint is:
Without going through all the details, the constraint essentially says "only select the variants that belong to the same Program but exclude the current project". For example, if our issue selects Project Link "ABC", then the two variants are shown. But if the Project Link is "ABC/Var1", then only the second variant is shown.
Examples:
2) Simple pick list with constraint
Our issues can be categorized, for example, if it's a Quality Issue, all possible values are defined here:
But on the Issue type, values are constrained based on some other field value used for further categorization:
I believe this answers the question "define drop-down values for a field dynamically?".
Note that no scripting (e.g. trigger) or "html code" are required.
