Are you using a form? If so, modify the calling code to read as follows.
The logic tree is as follows. The GETPROPERTY and SELECT statements
allow for broken sequences in the selection. Substitute the PK of the
table for RecordNumber.
1. Edit as usual
2. Within the form, user selects [Next], [Previous] or [Exit]
3. If user selects [Next] find the next matching record number in the
selection
4. If user selects [Previous] find the previous matching record number
in the selection
5. Upon return to the calling code, Go to the RecordNumber passsed back
to the calling code
6. If User has selected [Exit] do that.
.... Your existing code
SET VAR vButton TEXT = 'Exit'
EDIT USING FormName WHERE RecNum = .vRecNum
IF vButton TEXT = 'Next' or vButton = 'Previous' THEN
EDIT USING FormName WHERE RecordNumber = .vRecNum
ENDIF
... End of existing code
Add three buttons to the form with these EEPs and disallow [Esc], [X]
and [Alt-F4] in the form.
_[Exit]
_SET VAR vButton TEXT = 'Exit'
_[Previous]
_SET VAR vButton TEXT = 'Previous'_
_SET VAR vRecNumTxt TEXT
SET VAR vRecNum INTEGER
GETPROPERTY RecordNumber TEXTVALUE 'vRecNumTxt'
SET VAR vRecNum = (INT(.vRecNumTxt))
SELECT MAX(RecordNumber) FROM Table WHERE RecordNumber < .vRecNum
CLOSEWINDOW
_[Next]
_SET VAR vButton TEXT = 'Next'
SET VAR vRecNumTxt TEXT
SET VAR vRecNum INTEGER
GETPROPERTY RecordNumber TEXTVALUE 'vRecNumTxt'
SET VAR vRecNum = (INT(.vRecNumTxt))
SELECT MIN(RecordNumber) FROM Table WHERE RecordNumber > .vRecNum
CLOSEWINDOW
On 12/31/2014 2:02 PM, [email protected] wrote:
Thanks, but in this case I cannot use any tabular form such as grids,
list views or scrolling regions due
to the required layout.
Does anyone use the Property Table Search function, and if so, what is
your experience. It does exactly
what I need, but it is not responsive enough to use as I have
implemented it. I was hoping there was
something I was missing.
Other suggestions welcome!
-Bob
------------------------------------------------------------------------
*From: *"Tony IJntema" <[email protected]>
*To: *"RBASE-L Mailing List" <[email protected]>
*Sent: *Wednesday, December 31, 2014 2:50:45 PM
*Subject: *[RBASE-L] - RE: - Search for record in form. Second Question
Maybe this is an idea:
PROPERTY TABLE FormTable 'JUMP relPos'
Where:
FormTable is the appointed table by property
relPos is the relative number of jumps forward positive or backward
with negative value
Purpose: Will force focus to pointed record within a DBGrid or
Scrolling Region, depending on the current record-position.
In that case make use of enhanced db Grid (using the filter possibilities)
*From:*[email protected] [mailto:[email protected]] *On Behalf Of
*[email protected]
*Sent:* woensdag 31 december 2014 21:42
*To:* RBASE-L Mailing List
*Subject:* [RBASE-L] - - Search for record in form. Second Question
No responses on the first question, so I will ask from a different
perspective.
Does anyone have an application where the user can go to a particular
record and then move forward or backward from that point with the
navigator
bar or button eep's?
If so, how are you accomplishing the task?
Thanks,
-Bob
------------------------------------------------------------------------
*From: *"ttc inc" <[email protected] <mailto:[email protected]>>
*To: *"RBASE-L Mailing List" <[email protected]
<mailto:[email protected]>>
*Sent: *Wednesday, December 31, 2014 7:11:58 AM
*Subject: *[RBASE-L] - Search for record in form.
I normally call up an Edit Form directly to the record to be edited,
such as :
Edit Using FormName Where Column = value
However, while this method is fast, it only obtains one record and one
cannot
do a NEXT or PREV function.
I have a requirement to pull up a form starting at record "X", but
then be able to Next or Previous
from that record using a Navigator bar. The table is an Item Master
table and has only
about 4000 rows. A small table.
I have used the Property Table Search before, but in rare cases due to
slow speed.
However in this instance, I must have the ability to call up the form
at Record X and
then move back and forth in the record set.
I must be implementing this function incorrectly as it is extremely slow.
Below is the code I am using:
cls
--display a message
pause 3 using 'Locating Record....Please wait!' +
caption 'Item Master System' +
option gauge_visible on| gauge_color blue|gauge_interval 10
--Create command line
SET VAR vSearchString TEXT = NULL
SET VAR vSearchString = +
('PROPERTY TABLE ItemMaster SEARCH->Item->'+.vItem)
--conduct search
&vSearchString
I put the PAUSE message there to inform the user the computer is
not locked up as this method often takes minutes to pull up the
record. The column ITEM is an indexed record and in a single table form.
This form displays fields in the form via direct field placement. No
scrolling
regions, grids or listviews can be used in this instance as the data
will not
be displayed in a tabular form and one record per "screen / page" will be
displayed.
I need to place this function in a "Go To Item" Button EEP as well, so
the user
can be at Item 100 and jump directly to Item 3500 and then have the
ability to
PREV / NEXT from that spot. I have seen this type of function in
other programs
and know RBase can do anything the others can!
Any thoughts are appreciated.
Thanks,
Bob
--
A democracy ..." can only exist until the majority discovers it can vote itself
largess out of the public treasury."
Attributed to Alexander Fraser Tytler 1747-1813