Quantcast
Channel: aras PLM community
Viewing all articles
Browse latest Browse all 1103

Default list values

$
0
0

I have a list datatype consisting of 3 items. When I display the list values as a dropdown on a form, it contains one blank entry (default) and my 3 items.

It is possible to set the default value from my item type using the Default Value. However it is convenient not to have to set a default value, as I want to make sure the person entering the value is consciously selecting an option.

I have a C# server event checking onBeforeAdd and onBeforeUpdate to ensure a list item has been selected before saving the form. I check the value of my field and return an error if the user has not selected an item from the list:

Item theIssue = this;

String issuePhase = theIssue.getProperty("issue_phase");

if (String.Compare(issuePhase, "") == 0)

return this.getInnovator().newError("Issue timing must be selected.");


This works well if the user first selects a valid item, and then returns to select the NULL item. However on the creation of the form, before any item has been selected, this code does not detect that no issue was selected. I understand this to mean that a list value has both a NULL, and another (default?) value that I should check for, is this correct? What is this other default value?

Thanks!

- Mike


Viewing all articles
Browse latest Browse all 1103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>