Applying row entry to a browser?

dayv2005

Member
So i have this screen that shows company info depeneding on what company you are on. And when you click on this find company button. It launches another .w with a browser in it. of all the companies and be defalut it highlights the first row of the browser. I want it to highlight the row of the browser that is the same as the the comapny showing on the company screen.


Basically need to know how to add it to change the high lighted row.
 
Basically you require a handle to the record of the selected row in the first browse to pass as a parameter to the second window & browse to make Windows select that row.On the 'row-entry' trigger you are using eg MouseSelectDoubleClick assign the ROWID to VarROWID RUN whatever.w (INPUT VarROWID)Hope you can figure it out from that.Regards
 
Have a look at the REPOSITION statement.I believe there are many examples in Handbook and Reference docs. HIH
 
Does any one know whats happened with the posts formatting ?In some cases it seems to be using HTML tags atleast when its reopened but even then it usually discards the changes when saved. So you don't really have control over the post formatting.And in some cases it works just fine as it always used to.Did I miss something ?
 
OK So here's a better detailed part of the problem.

First on a button of the company screen im passing this to another window.

Code:
RUN FindComp2.w (OUTPUT o-RecID, OUTPUT o-ReturnCode, OUTPUT o-CBSalesmanID).

That's the info that is getting passed to the findcompany screen.

Depending on that recid (which is diff for each company on the screen).

I want that company highlighted on the browser of the find company screen.

But can figure out how to achieve this.

Here's the code from my query

Code:
DO WITH FRAME {&FRAME-NAME}:
    IF SESSION:SET-WAIT-STATE("GENERAL") THEN.
    CLOSE QUERY CompListing.
    DEFINE VARIABLE Q1String AS CHARACTER  NO-UNDO.
    DEFINE VARIABLE h1Query AS HANDLE     NO-UNDO.
    DEFINE VARIABLE strWhere AS CHARACTER  NO-UNDO.

    IF rs-Filter:SCREEN-VALUE = "2" THEN
        strWhere = "Company.SalesmanID = ~"" + cb-Salesman:SCREEN-VALUE + "~"".

    IF TRIM(scr-Search:SCREEN-VALUE) <> "" THEN
        CASE TRIM(cb-Search:SCREEN-VALUE):
            WHEN "Name" THEN
                strWhere = strWhere + MIN(strWhere, " AND ") + " Company.Name BEGINS ~"" + TRIM(scr-Search:SCREEN-VALUE) + "~"".
            WHEN "City" THEN
                strWhere = strWhere + MIN(strWhere, " AND ") +  " Company.City BEGINS ~"" + TRIM(scr-Search:SCREEN-VALUE) + "~"".
            WHEN "State" THEN
                strWhere = strWhere + MIN(strWhere, " AND ") +  " Company.State BEGINS ~"" + TRIM(scr-Search:SCREEN-VALUE) + "~"".
            WHEN "Zip"  THEN
                strWhere = strWhere + MIN(strWhere, " AND ") +  " Company.Zip BEGINS ~"" + TRIM(scr-Search:SCREEN-VALUE) + "~"".
        END CASE.

        IF t-badAdd:SCREEN-VALUE = "YES" THEN
                strWhere = strWhere +  MIN(strWhere, " AND ") + " Company.BadAddress = TRUE ".


    Q1String = SUBSTITUTE("FOR EACH Company WHERE &1  NO-LOCK BY Company.Name BY Company.City INDEXED-REPOSITION", strWhere).

          IF tMSG:SCREEN-VALUE  = "YES" THEN
            MESSAGE Q1STring
                VIEW-AS ALERT-BOX INFO BUTTONS OK.

        h1Query = QUERY CompListing:HANDLE.
        h1Query:QUERY-PREPARE(Q1String).
        h1Query:QUERY-OPEN().
        /* I'm guessing something like this*/
        /*h1Query:reposition-to-row   Something*/
        


 IF SESSION:SET-WAIT-STATE("") THEN.
 APPLY "value-changed" TO CompListing.

END.
END PROCEDURE.
 
Back
Top