Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
Script Library
Knowledge Base

Home > Support

Support Forum

Want to hide fields with no records
kaasen asked:
Is there a script I can use to hide fields with no records in display?  
  dougl responded:
  Do you want to hide the field or the entire record? Can you tell me more about the problem you're trying to solve?

Have you read about our #substitution# syntax?
  kaasen responded:
  I want yo hide fields thar are empty. You can look here:  
  dougl responded:
  Are you comfortable editing our view-source XML?

If yes, here is an example:
(For this example, the field you are trying to hide is named "Vakttlf". It is a text field.)

<ws:field name="Vakttlf" displaymodes="grid, update, insert"> ... </ws:field>
<ws:htmlblock displaymodes="details" visible="#record.Vakttlf#">
<ws:caption>Vakttlf</ws:caption>#response.encodeHTML( record.Vakttlf )#</ws:htmlblock>
  kaasen responded:
  Yes, I know how to edit the XML. If you look at the display you will see some gifs. Between the GLOBE and IATA I have an empty field, also under IATA.
I thought that it might be possible to give a command in the VISIBLE BOX under FIELD PROPERTIES
  dougl responded:
  >> I thought that it might be possible to give a command in the VISIBLE BOX under FIELD PROPERTIES

Well, that will work as well. What are the field-types for these fields? What are their names?
  kaasen responded:
TEXT FIELDS: Vakttlf,Info
  dougl responded:
  You can control all these types of fields with a simple logic statement:

set the visible property to

If their are no values for these fields in a record, record.<field name> is NULL. NULL is logically equal to FALSE.
  kaasen responded:
  Thanks. This is GREAT  
  kaasen responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

DataWeb Support
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us