KB Article 4591
2004/01/15

Close
X
Contact Tech Support

 Email Tech Support
 (250) 655-1766
 [7:30 - 5:00 PST]
Your Meeting ID will be Provided by a Rep.
Tech Support
Tech Support Home
Software Updates
Knowledge Base Search
Recent KB Articles
Product FAQs
Code Samples
Documentation
Tech Blog
System Requirements
Installation Instructions
Support Testimonials
Contact us to...
Create a Ticket
Request a Free Demo
Suggest a New Feature
Submit Feedback
Upload a Large File
Other Services
Software Training
Professional Services

Why my position to appears not to work correctly when using descending keys.

Product: ProGen Plus Type: Frequently Asked Question

Problem:
Sometimes when the Position To or Go To above the subfile is used it may appear that it is going to the wrong position in the list. This is probably happening because you have not specified a value to search for in each key field in the position to. This is most common when using descending keys.

The search function is looking for blank keys which, if it doesn't find, will position to the next key field after the one you specified.
 
Solution:
There is an easy remedy for this behaviour. In the context *OSLS, Override sort list sequence, use an if statement that updates every blank key field in the go to with *HIVAL. The following example is for a go to that uses an alternate view when a certain field is used to search on.
 
1.00 IF city,state,zip are blank
2.00   UPDFLD MCCITY <--*HIVAL *PGMFLD
3.00   UPDFLD MCSTATE <--*HIVAL *PGMFLD
4.00   UPDFLD MCZIP <--*HIVAL *PGMFLD
5.00 ENDIF city,state,zip are blank
 
When using alternate views you will have to include the indicators in the the condition along with the field names. For example if you are using alternate view 1 the condition would read something like this:
 
1.00 IF *in31 is on and city,state,zip are blank
2.00   UPDFLD MCCITY <--*HIVAL *PGMFLD
3.00   UPDFLD MCSTATE <--*HIVAL *PGMFLD
4.00   UPDFLD MCZIP <--*HIVAL *PGMFLD
5.00 ENDIF *in31 is on and city,state,zip are blank

Rate This Article

Did this example help you to achieve your goal?
 Yes  No  Don't Know

Enter additional comments below.   If you want to hear back from us, include your contact information.

Email Address:
Comments:
Please enable JavaScript in order to rate this page.