Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi, do check the lates update in the KB : Spreadsheet Hide Selected Value from Cascading Drop-Down List
I think the sample app and this KB initially caters for the continent column ONLY. Hence the reason why it works very well only if I use it in the first column .
Ive checked the latest KB and notice the sample app and KB has catered for multi column now.Which the Continent and Climate columns
Best for you to try on your end and adjust the script accordingly based on your preferences.
Hi Team I have a form with a spreasheet whith two fields that work with cascading Drop down dependency between thems Spreadsheet Cascading Drop-Down List , in other hand I'm trying to hide values to avoid duplicates in the second column as explain this note Spreadsheet Hide Selected Value from Cascading Drop-Down List , but I doesn't working , it work very well only if I use it in the first column .
I suspect that the problem is becuase the second field type DropDown has a AJAX and the behavior is different to the first field type DropDown without dependency.
Debugging the JS code I note this:
at removeSource (
2. The source variable which store the values from the column number 1 have this values :
function(query,process){var selected=hot.getSelected()[0];var row=selected[0];var col=selected[1];var meta=hot.getCellMeta(row,col);var o=meta.ajaxSourceOptions;var cf=o.OPTIONS_AJAX_CONTROL_FIELD.split(";");var cv="";for(var i in cf){if(cv!==""){cv+=";";}
cv+=hot.getDataAtRowProp(row,cf[i]);}
if(meta.ajaxControlValue===cv){var labels=[];for(var i=0;i<meta.keyOptions.length;i++){labels.push(meta.keyOptions[i].label.trim());}
process(labels);}else{$.getJSON(args.contextPath+"/web/json/app/"+o.OPTIONS_AJAX_APP_ID+"/"+o.OPTIONS_AJAX_APP_VERSION+"/form/options",{_dv:cv,_n:o.OPTIONS_AJAX_NONCE,_bd:o.OPTIONS_AJAX_BINDER_DATA},function(data){var labels=[];var keyOptions=[];for(var i=0,len=data.length;i<len;i++){labels.push(data[i].label.trim());keyOptions.push({value:data[i].value,label:data[i].label.trim()});}
hot.setCellMeta(row,col,"ajaxControlValue",cv);hot.setCellMeta(row,col,"keyOptions",keyOptions);process(labels);});}}
This is the JS code: