I took your advice:
In the form to find new Stakeholders, I have the following SelectItem:
The operationId is going after my negative join and trying to exclude in the list of potential new Stakeholders any Team Members that are already Stakeholders. I have an opertionID that selects a special fetch in the dataSource:
I am invoking it from the SelectItem. I can see that in this (SECOND) RPCRequest:
The result, which I cannot interpret, was:
As it turns out, the above is the SECOND of TWO requests made on the Team Member DS. Two requests.PNG show them side-be-side. I am not understanding. For some reason, there is a TeamMember DS request generated BEFORE the above RPCRrequest that does not use the operationID. RPC Log.PNG shows them both.
The first (DS) request happens starting at 12:06:07.235.
It retrieves all the Team Members, as you can see in the attached Result.PNG and the result from the DSRequest:
My suspicion is that, because of the previous fetch, the system thinks the second one is not necessary. There is no REAL fetch for the second request. If you look at the console log (attached) at 12:06:10.643, there is no SELECT statement or activity.
It seems odd to me that a "[client only] RPCRequest" would be used with an operationId that requires an explicit SELECT on the server side.
The fetch works if I can get to it:
When run against the database results in:
I need to do this technique in a number of areas. The good news is that the workaround is easy: just don't select current stakeholders. It avoids an annoying error popup.
Thanks,
Rick
P.S. I am running SmartClient Version: v8.2p_2012-06-08/EVAL Development Only on Mozilla Firefox 3.6.18 with Firebug using Windows XP Pro 32 bit.
Originally posted by Isomorphic
Code:
<FormItem name="TEAMMEMBERID" title="Team Member" constructor="SelectItem"> <valueField>TEAMMEMBERID</valueField> <displayField>TEAMMEMBERNAME</displayField> <optionDataSource><DataSource ref="TeamMember"/></optionDataSource> <optionOperationId>excludeCurrentStakeholders</optionOperationId> <autoFetchData>false</autoFetchData> </FormItem>
Code:
<DataSource ID="TeamMember" dataFormat="iscServer" serverType="sql" dataSourceVersion="1" dbName="PlanetProjectDB" schema="PUBLIC" autoDeriveSchema="true"> <fields> <field name="TEAMMEMBERID" type="sequence" primaryKey="true"/> <field name="COMMUNITYID" type="text" required="true" title="Community" canEdit="false" foreignKey="Community.COMMUNITYID"/> <field name="TEAMMEMBERNAME" type="text" required="true" length="64" title="Name" canEdit="true"/> <field name="ENABLED" type="boolean" required="true" title="Enabled" canEdit="true"/> <field name="TEAMMEMBEREMAIL" type="text" length="64" title="Email" canEdit="true"/> <field name="EMAILCONFIRMED" type="boolean" required="true" title="Confirmed" canEdit="false"/> <field name="ORGANIZATIONID" type="text" required="true" title="Organization" canEdit="true" foreignKey="Organization.ORGANIZATIONID"/> <field name="BASEPHONE" type="text" length="64" title="Phone" canEdit="true"/> <field name="MOBILEPHONE" type="text" length="64" title="Mobile" canEdit="true"/> <field name="BASELOCATION" type="text" length="64" title="Location" detail="true" canEdit="true"/> <field name="BASETIMEZONE" type="text" length="64" title="Time Zone" detail="true" canEdit="true"/> <field name="BASELANGUAGE" type="text" length="64" title="Language" detail="true" canEdit="true"/> <field name="BASENUMBERFORMAT" type="text" length="64" title="Number Format" detail="true" canEdit="true"/> <field name="BASEDATEFORMAT" type="text" length="64" title="Date Format" detail="true" canEdit="true"/> <field name="COMMUNITYADMIN" type="boolean" title="Admin" detail="false" canEdit="true"/> <field name="LOG" type="text" length="2147483647" title="Log" detail="true"/> <field name="CREATED" type="creatorTimestamp" title="Created" detail="true"/> <field name="MODIFIED" type="modifierTimestamp" title="Modified" detail="true"/> </fields> <operationBindings> <OperationBinding operationType="fetch" operationId="excludeCurrentStakeholders"> <tableClause>TeamMember CROSS JOIN Project LEFT JOIN Stakeholder ON Stakeholder.TeamMemberID = TeamMember.TeamMemberID AND Project.ProjectID = Stakeholder.ProjectID </tableClause> <whereClause>Stakeholder.TeamMemberID IS NULL AND ($defaultWhereClause)</whereClause> <invalidateCache>true</invalidateCache> </OperationBinding> </operationBindings> <cacheAllData>false</cacheAllData> <title>TeamMember</title> <titleField>TEAMMEMBERNAME</titleField> <pluralTitle>TeamMembers</pluralTitle> <generatedBy>SC_SNAPSHOT-2012-01-09_v8.2p/Pro Deployment 2012-01-09</generatedBy> </DataSource>
Code:
{ "dataSource":"TeamMember", "operationType":"fetch", "operationId":"excludeCurrentStakeholders", "componentId":"isc_PickListMenu_3", "data":{ "Project.ProjectID":101, "Stakeholder.CommunityID":101, "TeamMember.CommunityID":101 }, "startRow":0, "endRow":75, "textMatchStyle":"startsWith", "resultSet":[ResultSet ID:isc_ResultSet_12 (created by: isc_PickListMenu_3)], "callback":{ "caller":[ResultSet ID:isc_ResultSet_12 (created by: isc_PickListMenu_3)], "methodName":"fetchRemoteDataReply" }, "willHandleError":true, "showPrompt":false, "prompt":"Finding records that match your criteria...", "clientContext":{ "requestIndex":1 }, "requestId":"TeamMember$62713" }
The result, which I cannot interpret, was:
Code:
{ "status":0 }
The first (DS) request happens starting at 12:06:07.235.
Code:
{ "dataSource":"TeamMember", "operationType":"fetch", "data":null, "resultSet":[ResultSet ID:isc_ResultSet_13 (created by: undefined)], "callback":{ "caller":[ResultSet ID:isc_ResultSet_13 (created by: undefined)], "methodName":"fetchRemoteDataReply" }, "willHandleError":true, "showPrompt":true, "oldValues":null, "clientContext":{ "requestIndex":1 }, "requestId":"TeamMember$62714" }
Code:
[ { data:[ { ORGANIZATIONID:101, EMAILCONFIRMED:false, ENABLED:true, MODIFIED:new Date(1341864692453), TEAMMEMBERID:101, COMMUNITYID:101, CREATED:new Date(1341849600000), TEAMMEMBEREMAIL:"rick@menloparksoftware.com", COMMUNITYADMIN:true, TEAMMEMBERNAME:"Richard Bollinger" }, { ORGANIZATIONID:102, EMAILCONFIRMED:false, ENABLED:true, MODIFIED:new Date(1341864692468), TEAMMEMBERID:102, COMMUNITYID:101, CREATED:new Date(1341849600000), TEAMMEMBEREMAIL:"vicki.spencer@acs.com", COMMUNITYADMIN:false, TEAMMEMBERNAME:"Vicki Spencer" }, { ORGANIZATIONID:101, EMAILCONFIRMED:false, ENABLED:true, MODIFIED:new Date(1341864692468), TEAMMEMBERID:103, COMMUNITYID:101, CREATED:new Date(1341849600000), TEAMMEMBEREMAIL:"WhoMe@worry.com", COMMUNITYADMIN:false, TEAMMEMBERNAME:"Alfred E. Neuman" }, { ORGANIZATIONID:102, EMAILCONFIRMED:false, ENABLED:true, MODIFIED:new Date(1341864692468), TEAMMEMBERID:104, COMMUNITYID:101, CREATED:new Date(1341849600000), TEAMMEMBEREMAIL:"WhenDoI@eat.org", COMMUNITYADMIN:false, TEAMMEMBERNAME:"Lars P. Bear" } ], endRow:4, invalidateCache:false, isDSResponse:true, operationType:"fetch", queueStatus:0, startRow:0, status:0, totalRows:4 } ]
It seems odd to me that a "[client only] RPCRequest" would be used with an operationId that requires an explicit SELECT on the server side.
The fetch works if I can get to it:
Code:
select teammemberid, teammembername from teammember tm cross join project pr left join stakeholder sh on tm.teammemberid=sh.teammemberid and pr.projectid=sh.projectid where pr.projectid=101 and sh.teammemberid is null ;
Code:
TEAMMEMBERID TEAMMEMBERNAME 103 Alfred E. Neuman 104 Lars P. Bear
Thanks,
Rick
P.S. I am running SmartClient Version: v8.2p_2012-06-08/EVAL Development Only on Mozilla Firefox 3.6.18 with Firebug using Windows XP Pro 32 bit.
Comment