NetTalk Central

Author Topic: browse - EIP - dropdown  (Read 5600 times)

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
browse - EIP - dropdown
« on: June 01, 2010, 01:22:48 AM »
Hi,

I have a strange problem. Maybe a bug of some sort.
I have a browse (Country) with an EIP dropdown field. In this field I do a lookup to a table called Province. This Province table has a couple of fields. ID,CountryID and Description. The following is setup for the dropdown EIP:
FromFile: Province
Filter: 'PRO:CountryID=2'
Order: PRO:Description
Value: PRO:ID
Description: PRO:Description

When I open the browse the dropdowns on all rows of the Country browse contains all Province records, without using any filter.

When, as a test, I put this dropdown (with the exact same settings) on a form, the filtering works like a charm.

Why-o-why is this not working on the EIP inside the browse?
Anyone?

Greets!
Sjoerd
Greetz,
Sjoerd

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: browse - EIP - dropdown
« Reply #1 on: June 02, 2010, 12:57:08 AM »
Hi Sjoerd,

In a simple test here the filter seems to be working ok.
So have a look at the generated code, and debug normally.

Cheers
Bruce

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: browse - EIP - dropdown
« Reply #2 on: June 02, 2010, 01:45:10 AM »
Bruce,

These are two snippets of the source of the generated code. Offcourse I used an example to explain the problem. In the real app the tables are called RegistratieVraagAntwoord (Country) and Antwoord (Province).
This is the generated code from the EIP dropdown on the browse:

Code: [Select]
      open(RVA:AntwoordId_OptionView)
      RVA:AntwoordId_OptionView{prop:filter} = 'ANT:VraagId=1'
      RVA:AntwoordId_OptionView{prop:order} = 'UPPER(ANT:Antwoord_tekst)'
      db.debugout(ANT:VraagID & '-' & RVA:VraagId)
      db.debugout(RVA:AntwoordId_OptionView{prop:filter})
      Set(RVA:AntwoordId_OptionView)
      Loop
        Next(RVA:AntwoordId_OptionView)
        If ErrorCode() then Break.
        packet = clip(packet) & p_web.CreateOption(ANT:Antwoord_tekst,ANT:Id,choose(ANT:Id = RVA:AntwoordId),p_web.combine(p_web.site.style.browseDropOption,),,) &'<13,10>'
      End
      Close(RVA:AntwoordId_OptionView)


When putting the dropdown on a form this is the generated code:

Code: [Select]
 
  open(Reg:IngangId_OptionView)
  Reg:IngangId_OptionView{prop:filter} = 'ANT:VraagId=1'
  Reg:IngangId_OptionView{prop:order} = 'UPPER(ANT:Antwoord_tekst)'
  Set(Reg:IngangId_OptionView)
  Loop
    Next(Reg:IngangId_OptionView)
    If ErrorCode() then Break.
    if p_web.IfExistsSessionValue('Reg:IngangId') = 0
      p_web.SetSessionValue('Reg:IngangId',ANT:Id)
    end
        loc:rowstyle = choose(sub(' SelectList',1,1)=' ',clip(loc:fieldclass) & clip(' SelectList') & loc:even,clip(' SelectList') & loc:even)
    packet = clip(packet) & p_web.CreateOption(ANT:Antwoord_tekst,ANT:Id,choose(ANT:Id = p_web.getsessionvalue('Reg:IngangId')),clip(loc:rowstyle),,) &CRLF
    loc:even = Choose(loc:even=1,2,1)
    do SendPacket
  End
  Close(Reg:IngangId_OptionView)

I cannot find the difference that could cause my filtering issue on the EIP dropdown.

Greetz,
Sjoerd

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: browse - EIP - dropdown
« Reply #3 on: June 02, 2010, 05:51:00 AM »
It all looks good.
try posting the View declaration for the drop-down in the browse.
Perhaps that'll give us a clue.

cheers
Bruce

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: browse - EIP - dropdown
« Reply #4 on: June 02, 2010, 06:09:07 AM »
That's not going to be an eye opener, look at this;

Browse EIP:
Code: [Select]
RVA:AntwoordId_OptionView      View(Antwoord)
                          Project(ANT:Id)
                          Project(ANT:Antwoord_tekst)

Form:
Code: [Select]
Reg:IngangId_OptionView   View(Antwoord)
                          Project(ANT:Id)
                          Project(ANT:Antwoord_tekst)
[[code]
[/code]
Greetz,
Sjoerd

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: browse - EIP - dropdown
« Reply #5 on: June 02, 2010, 07:54:56 AM »
nope, nothing springs out - I guess I need an app example to explore further.

cheers
Bruce

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: browse - EIP - dropdown
« Reply #6 on: June 02, 2010, 10:55:07 PM »
Bruce,

I will send you an example by email.

Greets,
Sjoerd
Greetz,
Sjoerd

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: browse - EIP - dropdown
« Reply #7 on: June 05, 2010, 05:17:30 AM »
Hi,
I have found filters very unforgiving ( as they are in a desktop app).  I have taken Kevin's suggestion and created a variable to hold my filter string and created my own filter strings and debugged them - I would never have gotten them right without debugging the filter string.  I just shove a stop('filter ' & myfilterstring)  and see what the filterstring is really looking like...
FWIW,
Ron Jolda

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: browse - EIP - dropdown
« Reply #8 on: June 05, 2010, 07:23:51 AM »
Or better, you can use TraceIt to debug your NTWS code!
Take a look at http://www.armi.com.ar/TraceItEN.html
It works like a charm with NTWS and even your users will be able to help you totrace server problems.
Cheers
Alberto
-----------
Regards
Alberto

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: browse - EIP - dropdown
« Reply #9 on: June 06, 2010, 12:02:43 AM »
Bruce has investigated the code and there seems to be a minor bug. Should be fixed in a new build. Work-around was to have the lookup table as an Other table not as a secondary table.
Greetz,
Sjoerd