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



filtering function for dataregions
philyastrow asked:
I have complicated logic to apply to field values to determine if I want to show a record in a dataregion.  Effectively, I want to have a

<ws:dataregion .... filter=#shouldShow()#>

but I can't figure out how to pass the record into shouldShow() so I can examine the record and return 1 if it should be shown, 0 otherwise.  #shouldShow(record)# does not appear to work.  I can do a resultset to get the proper records, but I don't think that can be the source for a dataregion, eh?

Phil
 
  dougl responded:
  Nope. You can filter a query based on values that the query will return. You'll have to query your table twice.

You can, however, hide and show fields within a record once you've queried them.

Can you tell me more about your dataregion? Are you displaying in grid or details mode? How many records are you displaying per-page?
 
  philyastrow responded:
  Grid mode.  I am showing all records on one page.  I figured out any function inside the dataregion code only gets executed for the records on that page.  I set my pagesize="300" to be sure.

I don't want to hide and show fields, I want to hide an entire record if everything is complete.  If the record is not complete, then I want it to show.  Really, what I want to do is validate the data, and show records that are incomplete or invalid.

Phil
 
  dougl responded:
  You could write a complicated filter:
filter="=FirstName IS NULL OR LastName IS NULL OR PhoneNumber is NULL..."
 
  dougl 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