How to select current updated record in browse.

Posted by mohitmalik90 on 01-Jul-2014 02:38

hello all,

i want to select current updated record in browse.

exp- i have thousands of record in browse. so i add one more record.so by default control select the first record in browse but i want that control select this current record.

All Replies

Posted by mihai.pintea on 01-Jul-2014 03:04

U should take the RECID of this new created record and use: REPOSITION {&BROWSE-NAME} TO RECID r_Recid NO-ERROR. Where  r_Recid is the RECID of the current record .

Posted by mohitmalik90 on 01-Jul-2014 04:27

hello mihai.pintea,

my code is this...but error no 7330 is coming. error desription is

" Could not evaluate rowid during REPOSITION. (7330)

It is valid to use UNKNOWN value rowid's in a REPOSITION, but not valid to use a rowid expression that cannot even be evaluated at all."

so help  me for this solution.

    FIND FIRST  users WHERE users.user-id = users.user-id:INPUT-VALUE NO-ERROR .

    ASSIGN lv-rowid = ROWID(users)

    b-user:REFRESHABLE = NO.

    REPOSITION b-user TO ROWID lv-rowid.

    ASSIGN b-user:REFRESHABLE = YES.

Posted by mohitmalik90 on 01-Jul-2014 05:04

here i am using sequence with user-id.but if i am using this code without sequence then it's working correctly but with sequence it's not work..

please help me for this problem.

Posted by mihai.pintea on 01-Jul-2014 05:39

This is happend because the FIND is not finding any value. Put message to see what value is in: users.user-id:INPUT-VALUE. I think in this situation the value from lv-rowid is '?'.

Posted by mohitmalik90 on 01-Jul-2014 06:11

yes, you are correct sir. this message is coming blank..please suggest me what i need to do ?

FIND  users WHERE users.user-id = users.user-id:INPUT-VALUE NO-ERROR .

    MESSAGE users.user-id:INPUT-VALUE "USER id"

        VIEW-AS ALERT-BOX INFO BUTTONS OK.

    ASSIGN lv-rowid = ROWID(users)

    b-user:REFRESHABLE = NO.

    REPOSITION b-user TO ROWID lv-rowid NO-ERROR.

    ASSIGN b-user:REFRESHABLE = YES.

Posted by mihai.pintea on 01-Jul-2014 06:38

Probably will be better to take the ROWID in the moment you do the save, and use it after.

This thread is closed