Dynamic Table in Notes Client

Hello,

I have a client who would like to be able to add rows (fields, in edit mode) to a table dynamically.

There is some limit to the rows so I thought of building a table with ten rows, say, and revealing the rows depending on the value of a different field. So, e.g. if “rows” (a field) = 1 then the first row would show, if rows=2, the first and second, etc. In my mind I thought I might be able to do something like have a hotspot (“Add row”) that when clicked would update a hidden field (“rows”)- increment it by 1. That would then reveal the corresponding row. The problem is - if I make the hidden field a dialog list type field and say Refresh Fields on Keyword Change - then if the field value changes because of a hotspot click - nothing refreshes.

Does anyone have some ideas that might help me? They would like one of the fields to be a document link, clickable from the document one is in - so that making this all an embedded view isn’t so practical.

An visual example of what I want:

Add Row (<-Button/Hotspot Text)

Format Number Owner Link

Format Number Owner Link

…

This is for the Notes client so web-based suggestions aren’t going to help.

Thanks in advance,

Leonardo

Subject: Dynamic Table in Notes Client

Prior to the ability to embed views, creating a dynamic table was quite the challenge within the client. It is do-able, I was able to accomplish the task via multi-value fields and dynamic arrays in lotusscript. It is much easier no to simply embed a view…which appears as a dynamic table but in reality is, a view. You can even operate on the view directly, like an excel spreadsheet, See “Allowing users to edit or create documents from a view” in the notes help, and the “InViewEdit” event as well. The refresh issue you refer to above is also easily remedied via this solution, as you can simply leverage the view->refresh functionality to accomplish the task. It is a little tricky, but it is all laid out in the notes help of the designer client. HTH.-A. Young

Subject: RE: Dynamic Table in Notes Client

If the field value changes because of a hotspot click, your code changed the value. Your code can also refresh the hide formulas using @Command( [RefreshHideFormulas] ) or the LotusScript equivalent.

While embedding a view as Andrew suggests is sometimes a viable alternative to having tables on the form, it has drawbacks. It requires that the actual data be stored in separate documents, which means having a lot more documents, which hurts performance. You can’t have typeahead keyword fields, checkboxes, comboboxes, date pickers, and so on in the view. Since the data aren’t stored in the main document, you can’t search for the data using a full-text search and find the main document.

There are other techniques that allow for a table of indeterminate length. E.g. see Creating Truly Dynamic Tables in Notes 6… and this download.

Subject: RE: Dynamic Table in Notes Client

Yes the overhead is a def. downside. I have an application that is a perfect example of using both an embedded view, and a six column table, (with each column hosting a multi-value text field), each represent a dynamic table and a perfect solution for the purpose they each serve. It is an online quote generator app. The embedded view represents an entire categorized list of the company’s available parts. Selecting a part from this list populates another field in the document, next to which is an area to enter the quantity and add the selected item to the list, that is the group of multi-valued fields within the six-column dynamic table. Adding to the list grabs pricing information and description for that part, and creates line item and grand totals. The list being populated is the dynamic table. For each action available in that dynamic table, such as removing a line item, or adjusting a quantity, it prompts the end user to enter the line item number they will be acting upon, grabs the values of the multi-value fields and runs forall loops upon them while populating dynamic arrays with their contents, then acts upon the previous user input to translate that number into the equivalent array subscript(if the user input is 1, for example, they are actually removing subscript 0 of the all arrays)…then clears the multi-value fields and assigns the refined arrays back to their corresponding fields. It works perfectly.

Thanks for that link Andre I am going to download that db out of curiousity…I just wanna peek at other methods…

Subject: RE: Dynamic Table in Notes Client

Thanks - looks great!