NetTalk Central

Author Topic: errors using p_web.AddBrowseValue  (Read 4599 times)

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
errors using p_web.AddBrowseValue
« on: June 10, 2014, 07:49:28 AM »
Ive included an attachment of your sample web2.app with some changes e. MyAlias Button
I have hardcoded myalias button to use recordid 2 .
it seemd to igone the value of keyid 2 and uses the latest record you access via the browse alias and popup form.
run the pgm and see.
do the following
browse aliases and choose a record open the form, (notice the funny icon on top right)
close the form and browse
choose the myalias button and the record you previously open comes up.
if you browse the aliases records and open another alias form , close them again and then press the myalias button that record comes up, it seems to ignore record 2
I have done the same to myemail but left the button to default not popup then error -2 occors.

I have this same error in my app, however if the unique key is not numeric ie. character then the p_web.addbrowseValue appears to work ?/


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: errors using p_web.AddBrowseValue
« Reply #1 on: June 16, 2014, 02:25:56 AM »
please always include the dict, icons, and tps files where applicable with any posted example. It makes my job easier.

-- update, and I think you posted the wrong app Mike - I'm not seeing a MyAlias button anywhere....
« Last Edit: June 16, 2014, 02:32:20 AM by Bruce »

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: errors using p_web.AddBrowseValue
« Reply #2 on: June 16, 2014, 03:47:10 AM »
Ok , here is your exmaple web2.app basic with menu
the dct and the exe and the 2 tps files.


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: errors using p_web.AddBrowseValue
« Reply #3 on: June 16, 2014, 05:52:30 AM »
your link is incomplete.
you have
'?change_btn=change'  & p_web.AddBrowseValue('pageheadertag','Alias',ALI:key,2)
it should be
'?change_btn=change&_bidv_='  & p_web.AddBrowseValue('pageheadertag','Alias',ALI:key,2)

Cheers
Bruce

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: errors using p_web.AddBrowseValue
« Reply #4 on: June 16, 2014, 12:29:38 PM »
Thx Bruce, but I get the same result ???????

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: errors using p_web.AddBrowseValue
« Reply #5 on: June 17, 2014, 07:10:29 AM »
correction - no leading ? - should be...

'change_btn=change&_bidv_='  & p_web.AddBrowseValue('pageheadertag','Alias',ALI:key,2)

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: errors using p_web.AddBrowseValue
« Reply #6 on: June 18, 2014, 07:03:06 AM »
Thx Bruce that worked, for popup forms.
I have changed the demo on mailboxes for non-popup behavior
I cant get it to work with or without the ?
My app mycv.jmr.co.za  works in production but on development it doesn't ?
I cant  move my new code to production until I find out why ?
I have attached the new  app.


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: errors using p_web.AddBrowseValue
« Reply #7 on: June 18, 2014, 11:25:45 PM »
I think you didn't save the app before zipping and posting Mike - the app in the attachment is the first one...
can you post again please?

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: errors using p_web.AddBrowseValue
« Reply #8 on: June 19, 2014, 04:00:31 AM »
tried to recreate but it worked.
seems like the clarion dev environment templates have an error removing the & sign sometimes..
if the & sign dissapears as an "and" in astring you get a compile error , but if it dissapears on &_bDiv_ you dont.

thx agian sorry for the run around.
Im very pleased I found it.