NetTalk Central

Author Topic: Calling a Browse with Parameters  (Read 14545 times)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Calling a Browse with Parameters
« on: August 20, 2007, 05:50:55 AM »
Setting the URL for a browse is pretty trivial. Simply specify the name of the browse function, or the Page Name of the browse function.

By default the browse starts with the sort order you specified (Default Sort Order button) and it starts at the "top" of the table.

However you'll also notice that if you change the sort order, maybe page down a couple times, that it "remembers". For example if you then go off and do somethign else, returning to this browse a little later on, it'll be in the same sort order (and same position) that you left it.

This is all well and good, but what if you want to open a browse, using a specific sort order, and jump to a specific position, using just the URL. Well, you can.

The browse pays attention to the following parameters (amongst some others):
ProcedureName_Sort
Locator1ProcedureName
Refresh=sort
or
Refresh=locate

So using these 3 together, let's say our browse is called BrowseCustomers, the field we want to sort on is CUS:Name and we want to start with the customer starting with "Time".

The the URL becomes (in 2 steps)
http://127.0.0.1:88/BrowseCustomers?BrowseCustomers_Sort=+UPPER(Cus:Name)&refresh=sort
then
http://127.0.0.1:88/BrowseCustomers?Locator1BrowseCustomers=Time&refresh=locate

Cheers
Bruce

mriffey

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • Email
Re: Calling a Browse with Parameters
« Reply #1 on: September 17, 2007, 01:09:40 PM »
Bruce,

How exactly does the webserver expect to get the browse URL changed in 2 steps?

When I add &Locator1browsename=value&refresh=locate to the URL via a form lookup URL, the URL still ends up containing &refresh=sort

MedicationSelList?refresh=locate&Locator1MedicationSelList=Bacitracin&file=MedMst&LookupField=ODT:MedNam&Tab=0&ForeignField=MED:MedNam&MedicationSelList&refresh=locate&Locator1MedicationSelList=Bacitracin_sort=&Refresh=sort&LookupFrom=LabelSetInfo&

This is part of the URL Im working with. It was created like this via the lookup URL on a form field:

'MedicationSelList&Locator1MedicationSelList=' & clip(variable) & '&refresh=locate'

There isnt "2 steps" to build a URL available on a lookup, so Im not how you intend for us to set the URL in 2 steps. What do you mean by that comment?

Mark