Set a attribute to mandatory using a dynamic window calculation and a reference list.
Step by Step:
1. Go to Object Designer and Create a new Object under the module you want. For this example I have picked Incident.
2.Say No to the question about setting a behaviour.
3. Name the object and then click on "Behaviour" and set this to Reference.
4.Click on save and it will ask about creating a name attribute. Say Yes as this will create a guid attibute and a name attribute.
5.I have Named my object as Sub Category and from the above steps you will see the following.
6.Create a details attribute and set to -1
7.Drag the object to Incident and say No to the popup asking if you want to create a colleation.
8. Create a window using the Window Wizard
9.You will get a window like the following.
10. Go to the Administration component and start adding your sub categories.
11.Now go back to Object Designer and create a Attachment Attribute
12.Also create a String Attribute to the incident object. Set the lenght to be -1.and make it a Windows Calculation
13. Please see the following screenshot for a example of a calculation.
14.Test the Syntax
15.Go to Window Designer and open the window for Incident then add the Window Calculation attribute to the Window.
Also add the Sub Category one to one link then the Attachment Attribute
16. Set the Window Calculate attribute Show on Window to "False"
17. Set the "is calculated on change" to "True" on the Sub Category dropdown. Save all the changes and then you might need a recycle of the application pool.
18.Open in Webdesk
19. Test to see if the selected Sub category changes the attribute to be Mandatory or not, so for my calcultion and example selecting Sub1 will make it mandatory..
To enhance this you could instead of draging the Sub category to the Incident Object you could drag to the Incident Category but you would need to change the calculation slightly.