OK. This one is not going to be a never mind. I have been all over this without finding an answer. The 3 bad selectitems show the dropdown control, but only the key value currently in the ID field. And, when clicked it only shows one row. I know from experience that if it saw the 2 records in the database it would show 2 blank rows, even if it had the Display Field wrong.
The latest: since another selectitem was working, I made just a few changes to a problematic one to match it. I moved the formitem name and Display Field. VB picked up the foreign key and it worked. So, I know at least that I have not disabled or corrupted the selectitem.
Actually, I have two of them working. One points to Account, the other License. When I look at the server log I can see the fetches for both of these. I see no attempted fetches for the three problematic datasources. I saw no difference between the XML code among the five.
<DynamicForm numCols="8" dataSource="ref:Community" ID="CommunityDetailForm" autoDraw="false">
<fields>
<FormItem name="COMMUNITYID" title="Communityid" constructor="TextItem">
<visible>false</visible>
</FormItem>
<FormItem name="COMMUNITYNAME" title="Community Name" constructor="TextItem"/>
<FormItem name="ACCOUNTID" title="Account" constructor="SelectItem">
<displayField>ACCOUNTNUMBER</displayField>
</FormItem>
<FormItem name="LICENSEID" constructor="SelectItem">
<displayField>LICENSENAME</displayField>
</FormItem>
<FormItem name="ENABLED" title="Enabled" constructor="CheckboxItem"/>
<FormItem name="CONTACTNAME" title="Contact" constructor="TextItem"/>
<FormItem name="CONTACTEMAIL" title="Email" constructor="TextItem">
<colSpan>1</colSpan>
</FormItem>
<FormItem name="EXPIREDATE" title="Expire" constructor="DateItem"/>
<FormItem name="CONTACTPHONE" title="Phone" constructor="TextItem">
<startRow>true</startRow>
</FormItem>
<FormItem name="LOCATION" title="Location" constructor="TextItem"/>
<FormItem name="TIMEZONE" title="Time Zone" constructor="TextItem"/>
<FormItem name="LANGUAGE" title="Language" constructor="TextItem">
<startRow>true</startRow>
</FormItem>
<FormItem name="NUMBERFORMAT" title="Number Format" constructor="TextItem"/>
<FormItem name="DATEFORMAT" title="Date Format" constructor="TextItem"/>
<FormItem name="AGENDATEMPLATEID" constructor="SelectItem">
<startRow>true</startRow>
<displayField>TEMPLATENAME</displayField>
</FormItem>
<FormItem name="MINUTESTEMPLATEID" constructor="SelectItem">
<displayField>TEMPLATENAME</displayField>
</FormItem>
<FormItem name="REPORTTEMPLATEID" constructor="SelectItem">
<displayField>TEMPLATENAME</displayField>
</FormItem>
<FormItem name="AGENDAPRINTOPTIONS" title="Agenda Print Options" constructor="TextItem">
<startRow>true</startRow>
</FormItem>
<FormItem name="MINUTESPRINTOPTIONS" title="Minutes Print Options" constructor="TextItem"/>
<FormItem name="REPORTPRINTOPTIONS" title="Report Print Options" constructor="TextItem"/>
<FormItem name="DESC" title="Description" constructor="TextAreaItem">
<titleOrientation>top</titleOrientation>
<width>*</width>
<height>*</height>
<colSpan>5</colSpan>
<rowSpan>5</rowSpan>
<startRow>true</startRow>
</FormItem>
<FormItem name="NOTES" title="Notes" constructor="TextAreaItem">
<titleOrientation>top</titleOrientation>
<width>*</width>
<height>*</height>
<colSpan>3</colSpan>
<rowSpan>5</rowSpan>
</FormItem>
<FormItem name="LOG" title="Log" constructor="TextAreaItem">
<titleOrientation>top</titleOrientation>
<width>*</width>
<height>*</height>
<colSpan>8</colSpan>
<rowSpan>6</rowSpan>
<startRow>true</startRow>
</FormItem>
<FormItem name="CREATED" title="Created" constructor="TextItem">
<startRow>true</startRow>
</FormItem>
<FormItem name="MODIFIED" title="Modified" constructor="TextItem"/>
I even changed the DDL so that the problem FK’s were NOT NULL.
CREATE TABLE Community(
CommunityID BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 101, INCREMENT BY 1),
AccountID BIGINT NOT NULL,
CommunityName VARCHAR(64) NOT NULL,
LicenseID BIGINT NOT NULL,
Enabled BOOLEAN DEFAULT TRUE,
ExpireDate DATE,
ContactName VARCHAR(64),
ContactEmail VARCHAR(64),
ContactPhone VARCHAR(32),
Location VARCHAR(64),
TimeZone VARCHAR(64),
Language VARCHAR(64),
NumberFormat VARCHAR(64),
DateFormat VARCHAR(64),
AgendaTemplateID BIGINT NOT NULL,
AgendaPrintOptions CHAR(64),
MinutesTemplateID BIGINT NOT NULL,
MinutesPrintOptions CHAR(64),
ReportTemplateID BIGINT NOT NULL,
ReportPrintOptions CHAR(64),
Desc VARCHAR,
Log VARCHAR,
Created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
Modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT IDX_CommunityName UNIQUE (CommunityName),
CONSTRAINT IDX_Community_License FOREIGN KEY (LicenseID) REFERENCES License (LicenseID),
CONSTRAINT IDX_Community_Account FOREIGN KEY (AccountID) REFERENCES Account (AccountID),
CONSTRAINT IDX_Community_AgendaTemplate FOREIGN KEY (AgendaTemplateID) REFERENCES AgendaTemplate (AgendaTemplateID),
CONSTRAINT IDX_Community_MinutesTemplate FOREIGN KEY (MinutesTemplateID) REFERENCES MinutesTemplate (MinutesTemplateID),
CONSTRAINT IDX_Community_ReportTemplate FOREIGN KEY (ReportTemplateID) REFERENCES ReportTemplate (ReportTemplateID)
);
Well, I have to move on and this is not stopping that. But, I think I need some help in diagnosing what problem I have created.
I sort of finished the first app. It starts OK, but I really need to set it up so that it starts following a login that verifies the login, chooses which app starts, and passes context parameters to start the session.
And so onward I go.