4

I'm designing a workflow database in Lotus Notes 6.0.3 (soon upgrading to 8.5), and my OS is Windows XP.

I have recently tried converting a tabbed table into a programmable one. This was so that I could control which tab was displayed to the user when it was opened, so that they were presented with the most appropriate one for that document's progress through the workflow. That part of it works!

One of the tabs features a radio button that controls visibility of the next tab, and a pair of cascading dialogue boxes. One contains the static list "Person":"Team", and the other has a formula based on the first:

view:=@If(PeerReview = "Team"; "GroupNames"; "GroupMembers");
@Unique(@DbColumn(""; ""; view; 1))

The dialogue boxes have the property "Refresh fields on keyword change" selected.

The behaviour that I wasn't expecting is this. If the radio button is set to "Yes" and a value is selected in one of the dialogue boxes, the table opens the next tab. If the radio button is set to "No" and a value is selected in one of the dialogue boxes, the entire table is hidden.

I can duplicate the latter by switching off the "Refresh fields on keyword change" property on the dialogue boxes and instead pressing F9 after selecting a value. I have no idea why the former occurs, though. The table is called "RFCInfo", and I have a field on the form called "$RFCInfo" which is editable, hidden from all users who aren't me and initially set by a Postopen script, which I can post if necessary - it's essentially a Select Case statement that looks at a particular item value and returns the name of the table row relating to that value.

Can anyone offer any pointers?

Mark B
  • 41
  • 2

2 Answers2

2

Hide-when formulas in table cells in Notes R5 and R6 were notorious for breaking in unpredictable ways when you edited the table cells. Even in R7, I think they were still a little bit funky, but by R8 they were finally really solid. You haven't shown the hide-when's but my first guess is that you are simply a victim of the bad behavior.

Please don't shoot the messenger, but the usual way we addressed this sort of problem was to painstakingly re-create the entire table from scratch, and hope we never have to edit it again. I.e., make a copy of the table in a scratch form and clear all the hide-whens -- one by one. Then create a brand new empty table in a second scratch form and get all the cells set up exactly like the original table, including nested tables, merged cells, and other settings -- but skip the hide-whens for now. Then copy each cell's content from the first scratch form to the corresponding cell of the second scratch form. Then, referring to the hide-whens in the original form, re-create each hide-when on the paragraphs in the cells on the second scratch form. Finally, delete the original table from your original form and then copy/paste the table from the second scratch from back into your original form.

Richard Schwartz
  • 14,463
  • 2
  • 23
  • 41
  • Erk. I had hoped to avoid that kind of thing, but I will give it a go. Roll on Notes 8! Thanks for the tip. – Mark B Mar 29 '12 at 09:45
  • I've tried that (a mere 158 hide-when formulae), and the replacement table is still displaying the same behaviour. Which is frustrating. Think I'll switch back to a tabbed table, and leave the programmed features until the roll-out of Notes 8.5 is complete. – Mark B Mar 30 '12 at 11:13
  • Sorry to hear that it was so much work for nothing. In case you want to go forward, here are a couple of tips I use for dealing with hide-whens: 1. Write your formulas this way: !(showWhenCondition). Since you almost always think of your design in terms of what you should see, rather than what you shouldn't, matching the formula logic to your design goal will be easier. – Richard Schwartz Mar 30 '12 at 19:03
  • 2. Create hidden computed for display fields for each condition, and reference them from the hide-when formulas. E.g. !(showTab1), !(showTab2), etc. And if the formula for something like showTab1 is complex, break it down into additional computed for display fields, like !(($RCInfo = 1) & isRadioButtonYes & isDialog1ValueSet & isDialog2ValueSet). Make all these fields visible for debugging. – Richard Schwartz Mar 30 '12 at 19:10
0

Once you have R8.5, move to XPages in Notes, it's almost a no-brainer to implement your tabs. And in return, you get many other interesting issues to solve!

D.Bugger
  • 2,300
  • 15
  • 19