How to avoid the 64k limit when retrieving data from a view column?

我只是一个虾纸丫 提交于 2019-12-10 15:33:07

问题


I'm aware that the SSJS version of @DbColumn() has the same 64k limitiation as the original Formula language version. So up until now I used NotesView.getColumnValues() instead, believing that here I wouldn't face such a limitation.

Which obviously is wrong as an urgent support call yesterday tells me, as well as this crash report by IBM.

The code in question is used to populate the selectItems control in a comboBox; opening the page hosting the comboBox crashes the server's http task and then in consequence the entire server:

<xp:selectItems>
    <xp:this.value><![CDATA[#{javascript:database.getView("vwInvBySupplier").getColumnValues(0);}]]>
    </xp:this.value>
</xp:selectItems>

This is looking up all category entries from a view. I'm using the combo as a dynamic category filter to the view displayed on the same page.

What alternatives are there to retrieve the complete list of all category entries from the view, even if the data retrieved exceed 64k?

Sidenotes:

I'm fully aware that showing over 2000 entries in a comboBox might not be a convincing usability concept for some, but the customer loves to be able to see all available entries in one place, and then being able to select from that list. At least the standard solution with a view panel full of category entries, twisties, and the need to step through numerous pages is not a solution.

The application is running on Domino 9.0.1, WinSrv 2008/64k


回答1:


Luckily, an JavaScript array is not limited to 64K.

  • Create an array var values = [];,
  • "walk" through view with view navigator and add entry values to array with values.push("new value"),
  • return values


来源:https://stackoverflow.com/questions/23264890/how-to-avoid-the-64k-limit-when-retrieving-data-from-a-view-column

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!