Skip to main content
Participant
December 5, 2007
Question

Dymanic Form Data

  • December 5, 2007
  • 1 reply
  • 212 views
Is there a way to easily test for Null Values in Dynamic Forms?
Case example:
I have a Form that gets data from a SQL Database, one of the form items is a list/menu box. The case may be true that there may not be a value. How do I test this here is code:

<select name="DomainName2" id="DomainName">
<option value="0" <%=((0 == (DomainName.Fields.Item("workgroupDomainName").Value))?"selected=\"selected\"":"")%>>Workgroup/Domain</option>
<%
while (!DomainName.EOF) {
%><option value="<%=(DomainName.Fields.Item("workgroupDomainName").Value)%>" <%=((DomainName.Fields.Item("workgroupDomainName").Value == (DomainName.Fields.Item("workgroupDomainName").Value))?"selected=\"selected\"":"")%> ><%=(DomainName.Fields.Item("workgroupDomainName").Value)%></option>
<%
DomainName.MoveNext();
}
if (DomainName.CursorType > 0) {
if (!DomainName.BOF) DomainName.MoveFirst();
} else {
DomainName.Requery();
}
%>
</select>

I am hoping that there is an option I am not selecting somewhere that tests before execution.
It almost seems there is room for a feature request here. While in the Dynamic List/Menu properties box you have the options to select from Recordset, values, labels and select value equal to options. It seems that there should be an option to say if Null then ignore.
This topic has been closed for replies.

1 reply

Participant
December 5, 2007
Buler Buler...