hiding / showing fields / webblocks


I have a table and depending on a fields (fld_1) value other fields (but each team a different set of fields) have to be filled in. I thought on:
  1. hiding all fields (but fld_1) and depending on the value showing/hiding the appropriate fields
  2. using 9 webblocks, hide them, and showing only the block based on the value of fld_1
What would be a good approach, what's the best way to show/hide fields/webblocks , are there other approaches to handle this the best way.

Regards, Harry
Hi Harry,

I'm a bit lost in what you want... Can you give an example?

In general, if you have a table that has different columns depending on a condition you'd have on your webscreen an if (or several) and different TableRecords for each situation.

If you have a table whose content in the columns depends on a value from the first column then you'd have those IF's in that column.

If you have different columns base on a value from the first column then this is a case of nested tables and to do this you have to place webblocks in your TableRecords with these different configurations.

I hope this helps you.


Hi André,

Table: fld1,fld2....fld13

What I want is:
if fld1 value = 1 show fld2,fld3,fld4
if fld1 value = 2 show fld5
if fld1 value = 3 show fld6,fld7

Regards, Harry
So this would be a nested table?
No it's not a nested table. To give a live example: A have a table where there's a field MessageType. The user can choose the MessageType from values: Email, Call, SMS, etc. The table has also other fields: Email_to, Email_Message, Call_Telnr, SMS_Telnr, SMS_Txt etc. Depending on what MessageType a user chooses some fields must be filled in (ex: for type Email only the Email fields). So I want to show only that fields to the user.

Regards, Harry
Ah, so this is really a form to input data!

You can use the OnChange event on the MessageType input and based on that value you can condition the visibility of the other inputs with a mixture of the Visible property of the inputs and the AjaxRefresh widget on the Action of the OnChange event.

Check the attachment to see if it helps you out.

Thanks for the example André. Is it also possible to use an if condition for a row (now it seems that you have to use two (equal) conditions for the label as well for the editfield)?
It is not possible to it for the row, one of the reasons why I also have only a message field and not a email_message, sms_message, etc. fields.
OK, no problem, thanks for thr help,

Regards, Harry