Hide When In A table

I have a table with 10 rows in each row I have a field, the table has 4 columns. The top field has the titles (this has to be visible always). I want to hide all the rows from the second one down unless one of the fields on the top row (preferable the last one) is filled. I also have a comment field that I don't want to display for viewing if there is no comment in it, need this by FRIDAY!
Ray PadillaIT DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

For the table.....

using the mouse highlight the second row down, then go into text properties, select the hide when (looks like a window shade), select hide paragraph if formula is true, put the following (slightly modified) in the formula window....


For the comment field needs to be similar, same process....

u apply hide whens to entire cells not only for the particular cell.

And u may need to enable Auto refresh in Form properties.
First I want to say, there's no point in hiding a field when that field is blank, because there's nothing to see there anyway. But if you must, the hide formula @If(@IsDocBeingEdited; @False; fieldname = ""). Of course, if you also want to hide it sometimes in edit mode based on the values of other fields, the logic gets more complicated and you would need a longer formula.

You're going to have a problem with getting the hide formulas to refresh as data are entered. Only keyword fields (dialog list, checkbox, combobox, etc) support instant refresh when the field value changes (there's a field option you can tick). With other field types, you would have to write entering and exiting event code to decide when to refresh hide formulas, and if you base it on the last field in the row, then you have the problem that as you tab out of that field, the field you want to tab into is not yet displayed.

Be careful with your hide formulas. Consider what happens if the hide formula for row 4 is based only on whether there are values in row 3. If someone fills in rows 1 thru 4 and then erases all the values in row 3, row 4 becomes uneditable, even though there is already data in it. Each formula would have to test two rows to decide whether it was hidden -- itself and the previous row.

Please consider making the entire table visible in edit mode -- it will make your job so much easier. Then you can use hide formulas to hide the rows that are blank -- based on the contents of _that_ row, with a formula such as: @If(@IsDocBeingEdited; @False; somefield4 = "") -- if it were on row 4, for example. If there is some field that must be filled in for the row to be considered in use, use that field in this formula. Then make sure you write validation formulas so that the document cannot be saved with values in other fields of the row but not in that "required" field.

You might also think about creating a table editing dialog that lets the user enter any number of rows, as described here:

Each column is stored as a multivalue field. This lets you use a lot fewer fields, and write formulas that work with an entire column at a time using a single name.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.