Note that there are some explanatory texts on larger screens.

plurals
  1. POComputing the combobox values inside a DOJO Data Grid on an xPage based on one of the column values of the current row
    primarykey
    data
    text
    <p>I need to compute (using ssjs) the options inside the combobox which is withing an editable column inside the Dojo data grid. The combobox values need be computed based on a column value in the same row. For e.g if column B has the value "1" the the selection in column E should display the options 5,10,15 and if the value in column B is "2" the options should be 10,20,30. Update: Below is my code until now, I need to populate the values in the columns labeled "Relative Ranking - SC Level 1", "Relative Ranking - SC Level 2" and "Relative Ranking - SC Level 3" based on the values in the column "Grade Cluster". Based on the Grade Cluster for a particular row I need to get the count of how many documents have the particular Grade Cluster and accordingly populate relative ranks. For e.g if there are 10 rows having the Grade Cluster "G1" then I need to populate the values 1/10 to 10/10 in the Relative Ranking columns in each of the rows having the Grade Cluster as "G1".</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex" dojoTheme="true" dojoParseOnLoad="true"&gt; &lt;xp:this.resources&gt; &lt;xp:dojoModule name="dojox.grid.cells.dijit"&gt;&lt;/xp:dojoModule&gt; &lt;xp:styleSheet href="/Dojo_Grid_Style.css"&gt;&lt;/xp:styleSheet&gt; &lt;/xp:this.resources&gt; &lt;xp:this.beforePageLoad&gt;&lt;![CDATA[#{javascript:var key = sessionScope.key; var curDB:NotesDatabase = session.getCurrentDatabase(); var vwlkApprView:NotesView; var collDocAppr:NotesDocumentCollection; vwlkApprView = curDB.getView("vwlkApprSCID"); collDocAppr = vwlkApprView.getAllDocumentsByKey(key); viewScope.scApprDocCount = collDocAppr.getCount();}]]&gt;&lt;/xp:this.beforePageLoad&gt; &lt;xp:panel id="pnlScreening" style="height:auto;width:100.0%"&gt; &lt;xe:restService id="SCViewData"&gt; &lt;xe:this.service&gt; &lt;xe:viewItemFileService viewName="vwlkApprSCID" defaultColumns="true" keys="# {javascript:sessionScope.key;}" keysExactMatch="true" var="apprDoc"&gt; &lt;xe:this.columns&gt; &lt;xe:restViewColumn name="rrValues"&gt; &lt;xe:this.value&gt;&lt;![CDATA[# {javascript:var apprRow = requestScope.get("apprDoc");print(apprRow);}]]&gt;&lt;/xe:this.value&gt; &lt;/xe:restViewColumn&gt; &lt;/xe:this.columns&gt; &lt;/xe:viewItemFileService&gt; &lt;/xe:this.service&gt; &lt;/xe:restService&gt; &lt;xe:djxDataGrid id="djxDataGrid1" selectionMode="single" rowsPerPage="90" autoHeight="100" singleClickEdit="true" storeComponentId="SCViewData" jsId="apprSCGird"&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn1" field="AppraiseeEmpID" label="E.No" width="2%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn2" field="AppraiseeName" label="E.Name" width="6%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn3" field="Appraisee_Grade" label="Grade" width="2%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn4" field="AppraiseeCWLCluster" label="Grade Cluster" width="2%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn5" field="AppeTotImpRate" label="Appraisee Impacted Rating" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn6" field="ApprTotImpRate" label="Appraiser Impacted Rating" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn7" field="RevTotImpRate" label="Reviewer Impacted Rating" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn8" field="ApperFinalGrade" label="Appraiser Final Grades" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn17" field="ApperRelativeRank" label="Appraiser Relative Ranks" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn9" field="RevFinalGrade" label="Reviewer Final Grades" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn10" field="RevRelativeRank" label="Reviewer Relative Ranks" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn11" field="SCFinalGradeL1" label="Final Grading - SC Level 1" width="5%" editable="true" cellType="dojox.grid.cells.Select"&gt; &lt;xe:this.options&gt;&lt;![CDATA[#{javascript:var states = ['1', '2', '3', '4', '5'];return states;}]]&gt;&lt;/xe:this.options&gt;&lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn12" field="SCRelativeRankL1" label="Relative Ranking - SC Level 1" width="5%" editable="true" cellType="dojox.grid.cells.Select"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn13" field="SCFinalGradeL2" label="Final Grading - SC Level 2" width="5%"&gt;&lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn14" field="SCRelativeRankL2" label="Relative Ranking - SC Level 2" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn15" field="SCFinalGradeL3" label="Final Grading - SC Level 3" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn16" field="SCRelativeRankL3" label="Relative Ranking - SC Level 3" width="5%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn18" field="AppraiserName" label="Appraiser Name" width="6%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xe:djxDataGridColumn id="djxDataGridColumn19" field="ReviewerName" label="Reviewer Name" width="6%"&gt; &lt;/xe:djxDataGridColumn&gt; &lt;xp:eventHandler event="onRowClick" submit="true" refreshMode="partial" refreshId="pnlScreening"&gt; &lt;/xp:eventHandler&gt; &lt;/xe:djxDataGrid&gt; &lt;/xp:panel&gt;&lt;/xp:view&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload