Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Does anyone know the correct syntax to set a dropdown field using the "Computed as" logic? For example if I want to automatically set a dropdown to option id 1, how would I do that? I have tried several things, such as choiceField[2][1], choiceField[2][0]_option[1], etc, from the Codebeamer documentation but nothing seems to work.
Solved! Go to Solution.
Dear Chris,
Sorry my bad, forgot one crucial thing:
Let me know if that does the trick 🙂
Cheers,
Nico
Hi,
The syntax is <propertyNameofTheChoiceField>_$option[<optionID>]
So for example if you want to calculate that the field choiceList[1] should have the 2nd option selected by computation, this would be the syntax:
choiceList[1]_$option[2]
This is also described here in the documentation (just not indexed well in the table of contents): https://codebeamer.com/cb/wiki/25722#section-Context+Variables
Hope this helps,
Cheers,
Nico
Hey Nico,
Thank you for your reply.
I have tried the syntax you have mentioned from the documentation. This does not allow me to save the changes to the field. I get an error:
Compiling "choiceList[4]_$option[1]" to compute "Validated Cycle/Vendor (AMISC1-6)" failed: "Cannot convert of type class com.intland.codebeamer.persistence.dto.ReadOnlyChoiceOptionDto to interface java.util.List" Please save the tracker configuration before you use newly added fields in expressions.
Do you have any idea why this might be?
Chris
Dear Chris,
Sorry my bad, forgot one crucial thing:
Let me know if that does the trick 🙂
Cheers,
Nico
Hey Nico,
That worked!
Thank you for the help.
Hi @CM_9399659 ,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Hey Catalina,
I don't see the "Reply as Accepted Solution" button on my screen.
Hi @CM_11253122,
Only the author of the topic, in our case @CM_9399659, can mark a reply as the Accepted Solution.
Thanks!