Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
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?
http://helpv2.westside.com/default.view?Topic=views/vaddingscripts/poundDelim
 
  kaasen responded:
  I want yo hide fields thar are empty. You can look here: http://kaasen.westside.com/Kunde/default.view?_mode=details&KundeID=42  
  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:
  HTML FIELDS: NSF,IATA,NFF,FIATA,Ebiz
TEXT FIELDS: Vakttlf,Info
URL  FIELDS: WEB
 
  dougl responded:
  You can control all these types of fields with a simple logic statement:

set the visible property to
#record.nsf#
#record.iata#
#record.nff#
etc..

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.

Thanks,
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