Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
hi all,
how to write conditional constraint to achieve as follow
Two attributes:
ATTRIBUTE_1 (CAR_BRAND) & ATTRIBUTE_2 (MODEL).
Value of ATTRIBUTE_1 could be:
- VALUE_1 (BMW) or VALUE_2 (AUDI)
Value of ATTRIBUTE_2 can be:
- VALUE_11 (X5) or VALUE_12 (X6)
if VALUE_1 (BMW) was selected
or
- VALUE_21 (A4) or VALUE_22 (A6)
if VALUE_2 (AUDI)was selected
how to do it in PDMLink??
THX
In 10.x there is a way to achieve this but of course ATTRIBUTE_2 will not be a dynamically updated drop down. It will remain as a text box but will have the required validation. Refer following:
1. Create ATTRIBUTE_1 with enumerated values as Audi, BMW.
2. Create ATTRIBUTE_2 with two enumerations as (BMW_v1, BMW_v2) and (Audi_v1, Audi_v2)
3. Create constraints on each as shown in the following image:
This is how it works:
Feel free to add your findings and do let me know if this helps.
Regards,
Bhushan
The main purpose of my issue was to find any way to achieve situations when second attribute is chosen from the list.
But thank for your answer.
Regards,
Krzysztof
Krzysztof,
On top of the above constraints, you can add another one with Legacy value list having all the values like BMW_v1, BMW_v2 ,Audi_v1, Audi_v2.
This will allow users to see those values as a drop down list and the validation will be done after the user clicks on the finish button. As mentioned earlier this will not dynamically update the values of the second attribute.
Regards,
Bhushan
Hi Krzysztof,
You can also refer to the following screen shot with the additional legacy constraint added on the second attribute as mentioned in the previsions comment. Please let me know if that helps.
Regards,
Bhushan
Hi Bhushan,
last shot looks great. What conditions did you add to ADWRootDesign? I wasn't able to achieve drop down list for the second attribute when it depends of the other one.
regards,
Krzysztof