NetTalk Central

Author Topic: browse highlight bar  (Read 3702 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
browse highlight bar
« on: February 24, 2015, 10:46:45 AM »
I want the highlight bar to only appear when a user selects a row in a filtered browse.  Currently the default is to highlight the first row when the browse is first opened.  Is there a way to do this?

Thanks,

Jeff King

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: browse highlight bar
« Reply #1 on: February 24, 2015, 07:43:43 PM »
     This also becomes a problem when I search for a patient by name.  The result is one record in the browse that is apparently highlighted.  But when I call another browse that should be filtered by the current highlighted record's unique ID, the unique ID is not available unless I explicitly click on the found record.

     Based on previous posts from Bruce, I have tried to load the record using p_web._LoadRecord and p_web.FileToSessionQueue, in the Generate Browse embed, but this does not work for me now.  My thought is to somehow turn off the highlight until I explicitly select a record.  Perhaps someone has a better solution?

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: browse highlight bar
« Reply #2 on: February 25, 2015, 05:29:22 AM »
I've tweaked it for the build 8.39
(that's not a type - 8.38 is up - so 8.39 will be the next one.)

In 8.39 you can clear the "selected record" by doing;

 p_web.SetOption(loc:options,'value','')


in the ClosingScripts routine before the line

 p_web.ntBrowse(loc:divname,loc:options)


I think that will solve your other issue as well.

cheers
Bruce

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: browse highlight bar
« Reply #3 on: February 25, 2015, 07:06:44 AM »
Bruce,

     Thanks for doing this.  I'll get the latest version (I'm still on 8.23) and test it. 

     I just want to be sure I understand how things work.  My current understanding is that when a row is clicked, the Unique ID set in the template is all that is loaded into the session queue.  This unique ID is not loaded into the session queue when the first record in a browse is highlighted upon opening the browse.  Is this correct?

     In addition, when using the p_web._LoadRecord and FileToSessionQueue, I must explicitly open the file as well, as seen here:

Enr:Patient_ID = p_web.GSV('Enr:Patient_ID')
Access:PatientEnrollment.Open()
Set(Enr:PatID_key, Enr:PatID_key)
Access:PatientEnrollment.Fetch(Enr:PatID_key)
p_web._LoadRecord(PatientEnrollment, Enr:PatID_key)
p_web.FileToSessionQueue(PatientEnrollment)

Is this correct as well?

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: browse highlight bar
« Reply #4 on: February 26, 2015, 04:38:49 AM »
>>  This unique ID is not loaded into the session queue when the first record in a browse is highlighted upon opening the browse.

I would say that this _is_ loaded into the session queue when the browse is first opened. that part is a bit strange to me. But I would need to see an example of what you are doing to understand more fully.

Recently Robert had a similar issue, but he was using a button on a browse row to repopulate the browse - with the selected row explicly omitted. Which can make for some strange ID bubbling...

>> In addition, when using the p_web._LoadRecord and FileToSessionQueue, I must explicitly open the file as well,

you should always assume you have to open the file before accessing a file, unless you know for sure it's in a place where you don't have to. It's a lot more common to have to open it than not.

cheers
Bruce