×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Record Filtering and Conditional Behavior

Record Filtering and Conditional Behavior

Record Filtering and Conditional Behavior

(OP)
I have a table in a Browse window that I need to be able to show all records and have two options to filter out records by a specific code (Employee Type: Current, Former or both).  

I added the Employee Type and all variable fields to the Hot Fields list so the Browse window does refresh.  When both the Current and Former checkboxes are selected, all records are displayed correctly.  

However, if only the Current or only the Former checkbox is checked, it either displays no records or only one.  In the Conditional Browse Behavior screens, I have the Condition and Key to Use set (which is Lastname, Firstname, Employee Type).  When I try to use Record Filter, I always get a runtime error about the field not being BIND, but I have the Employee Type and variables set in the Data and Embed areas included in the Hot Fields tab with the BIND option selected.

So, I gave up on that and have been trying to use the Range Limit Field (Employee Type) and Range Limit Type which is set to a variable that is set to the respective Employee Type codes.

When both types are selected, the first record is a Former employee.  If I select the Former checkbox, only that Employee's record is displayed.  The same happens if I have a Current record selected with both options checked, then I uncheck the Former box.  So it is filtering but only displays the current record.

The attachment here shows the Browse window with the Conditional Behaviors.  Current and Former checkbox variables are EMPselected and XEMselected respectively.  The EMPcode in Range Limit Value is set to 'EMP' in this case that's previously set in an Embed.

I understand it might be difficult for you to understand this from an outside point of view so let me know if you have any questions.

RE: Record Filtering and Conditional Behavior

(OP)
FYI - The error that appears when I try to use Record Filtering is:

View Open Error
Error: (No BIND on variable (801)) attempting to open the current VIEW.  Filter and Range Limits ignored.

RE: Record Filtering and Conditional Behavior

Hi!

The first thing you need to do is add CHOICE(?EmployeeTab) = 1 AND before the 4 conditions starting with EMPSelected.

Have you marked the FILE as Bindable in the dictionary. This will allow all the columns to be used in Filters without an explicit BIND. Otherwise, you need to BIND all variables (Columns or Local Variable) if you want to use them in a filter.

Please post the KEY columns of the Key used in the Range. Also, post the filter you tried to use.

Regards
 

RE: Record Filtering and Conditional Behavior

(OP)
Okay, I'm starting with your first recommendation to add CHOICE, but that caused another question.  I need the Current and Former filters available for all 3 tabs, so will I need to do that for each CHOICE where I'll end up with 12 Conditional Behaviors (4 checkbox possibilities times 3 tabs)?

RE: Record Filtering and Conditional Behavior

(OP)
MAKING PROGRESS!

I answered my last question -- yes I did have to go back and add more Conditional Behaviors for each tab.

While I was replying here again about your request to post KEY columns of the Key used in the Range, I started to think and tinker around again.  After a while, I have virtually everything working except for a sorting problem.

Something told me the Contact_Type field had to be the first in each Key in order for the Limit Range to work.  So, I went back and modified my Keys for Days until Birthday and Days until Anniversary and included the Contact_Type as the first field in the Key list.  That's works if you select Current OR Previous checkboxes.  But if you select both, the sort is by Contact Type, then Days until X.  If I move the Contact Type field below the Days of X field in the Key, then the Browse window only shows a couple of records.

Make sense?

RE: Record Filtering and Conditional Behavior

(OP)
Okay, I cheated.  I created new Keys with just the Days until X fields in the Key to Use when both Current and Formal are selected.  Everything works now.

This seems like a waste of Keys, and I'm probably not doing it properly, but it works.

Thanks, again, ShankarJ!

RE: Record Filtering and Conditional Behavior

Hi!

Since the Conditional Behavior allows you to CHANGE the key used, you would use the key with Employee_Type when one of the Former/Current check boxes are ticked but you can use any other key like First Name, etc when BOTH are ticked (since you are no longer filtering on Employee_Type).

Is this a legacy or ABC APP?

Regards
 

RE: Record Filtering and Conditional Behavior

(OP)
How can I tell the difference?

RE: Record Filtering and Conditional Behavior

Hi!

If you choose Application -> Properties from the menu, does the Application template say "Clarion" OR "ABC"? Clarion means Legacy or non object-oriented procedural code.

Regards
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close