End-users maintaining Ensemble Data Lookup Tables
We are currently looking into a way to provide a group of end-users (i.e. non-Interface Development engineers) access to a pre-defined group of Ensemble-based Data Lookup Tables for purposes of viewing and editing. We do not want to give them access to ALL Data Lookup Tables due to security/continuity concerns.
My thinking is that a simple persistent Cache table with three columns (Role Name, Table Name, Access-Level [like View or Edit]) with a CSP front-end could potentially provide an easy way to make this solution a reality.
I heard some discussion at the Conference last week that a code sample may already be available to give us a jump start in this direction but I have not been successful in locating one. Is anyone anywhere of such a sample or perhaps has delved into this themselves that might be willing to share a little context in how it could be accomplished? I am relatively new to Cache/Object Script/CSP development but eager to get my feet wet.
Thanks in advance -
Craig
I just worked with WRC on this same issue. I was able to make copies of %ZEN.Dialog.finderDialog and EnsPortal.LookupSettings. By using these copies I was able to modify some of the methods to limit down the number of tables a end user would have access too by using a filter on the Naming convention.
{
Method GetFinderArray(ByRef pParameters, Output pMetaData, Output pData) As %Status
{
Kill tParms
// assemble search parameters
Set tParms("sort") = ..currSortMode
Set tParms("search") = ..searchKey
Set tParms("abstract") = ..includeAbstract
if (..mode = "labLookup"){
s tSC = ##class(%ZEN.FinderUtils).%GetArrayForQuery("Ens.Util.LookupTable","Enumerate",$LB("{Name}","{Name}_"".lut""","lut",""),".",,.pMetaData,.tData)
s k=""
for {
s k=$order(tData(k))
q:k=""
s tableName = $li(tData(k),1)
if (tableName [ "LABS") {
s pData($i(pData)) = tData(k)
}
}
q tSC
}
else {
Quit ##class(%ZEN.FinderUtils).%GetClassListArray(.tParms,.pMetaData,.pData)
}
}
Class osuwmc.DataLookup.testLookupSettings Extends EnsPortal.LookupSettings
{
/// Handle various dialogs.
ClientMethod onPopupAction(popupName, action, value) [ Language = javascript ]
{
try {
if (action != "ok") {
return false;
}
popupName = this.removePopupSuffix(popupName);
switch(popupName) {
case 'NewLookup':
if (value.substring(value.length-4).toUpperCase() != '.LUT') value += '.lut';
// note that we fall through to open the page for both NewLookup and LookupOpen
case 'LookupOpen':
var link = zenLink('osuwmc.DataLookup.testLookupSettings.zen');
link += (link.indexOf('?') > -1 ? '&' : '?') + 'LookupTable=' + encodeURIComponent(value);
this.setModified(false);
this.gotoPage(link);
break;
case 'switchNamespace':
zenPage.changeURLNamespace(value);
break;
case 'LookupSaveAs':
if (value.substring(value.length-4).toUpperCase() == '.LUT') value = value.substring(0,value.length-4);
zenPage.checkName(value);
break;
}
}
catch (ex) {
alert("Error: " + ex);
}
}
/// If the new name is already in use, confirm that the user wishes to overwrite the old table of that name.
ClientMethod checkName(newName) [ Language = javascript ]
{
var duplicateName = zenPage.NameCheck(newName);
if (duplicateName !="")
{
if (!confirm($$$FormatText($$$Text("Lookup table name '%1' is already in use! Are you sure you want to overwrite this table?"),duplicateName))) {
return;
}
zenPage.RemoveTable(duplicateName);
}
zenPage.renameSave(newName);
var link = zenLink('osuwmc.DataLookup.testLookupSettings.zen');
link += (link.indexOf('?') > -1 ? '&' : '?') + 'LookupTable=' + encodeURIComponent(newName+".lut");
this.setModified(false);
this.gotoPage(link);
}
ClientMethod openTable() [ Language = javascript ]
{
if (this.pageModified) {
var doOpen = confirm($$$Text('The current lookup table has been modified. Do you wish to discard these changes and open a different lookup table?'));
if (!doOpen) return;
}
var parms = { MODE: "labLookup"};
zenLaunchPopupWindow(zenLink('osuwmc.DataLookup.testFinderDialog.cls'),this.addPopupSuffix('LookupOpen'),'status,scrollbars,resizable=yes,width=800,height=600',parms);
}
Method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String, Output pCommands As %List) As %Status
{
Set pDisplay = 1
Set pRibbonTitle = $$$Text("Lookup Table Viewer")
Set pCommands(1) = $LB("btnOpen",$$$Text("Open"),$$$Text("Open an existing lookup table"),"zenPage.openTable();")
Set pCommands(2) = $LB("btnSave",$$$Text("Save"),$$$Text("Save the current lookup table"),"zenPage.saveTable();")
Set pCommands(3) = $LB("btnSaveAs",$$$Text("Save As"),$$$Text("Save the current lookup table with a different name"),"zenPage.saveTableAs();")
Quit $$$OK
}
}
Since Zen will be discontinued in IRIS 2025, has anyone developed another solution for end-users maintaining specific Ensemble Lookup Tables?
@Jennifer Dennis I didnt see an official announcement of ZEN being discountinued in 2025.
What specifically does "discountinued" mean?
Does this mean all of our ZEN application pages will no longer work with a 2025 kit?