NetTalk Central

Author Topic: Dynamic fields  (Read 4761 times)

Matthew51

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Email
Dynamic fields
« on: June 25, 2009, 11:35:58 AM »
I want to create a button that when the user presses it 1 or more fields on the form are changed.  In other words, almost exactly what the calculator example does.  However mine doesn't work and I can't figure out why.  As far as I can tell all settings in the form are the same.

In the 2 Validate embed I have:
ISS:Employee = 'Test me!'
p_web.SetValue('ISS:Employee', ISS:Employee)
do value::ISS:Employee
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Dynamic fields
« Reply #1 on: June 25, 2009, 07:26:09 PM »
I would normally just do via the templates. So on server side tab for the button control I would click the embed button to put in any code that would run server side when the button is clicked and then add any fields that I wanted refreshed in the list. I do this on fields not buttons so maybe it is different...

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Dynamic fields
« Reply #2 on: June 25, 2009, 10:59:53 PM »
you should be setting the SessionValue, not the Value.

Cheers
Bruce

Matthew51

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Email
Re: Dynamic fields
« Reply #3 on: June 26, 2009, 11:24:26 AM »
you should be setting the SessionValue, not the Value.

Cheers
Bruce


I just knew it would be something simple like that.  Thanks for the reply.  On a related note, trying to update a memo field in this way will cause the web server to crash.  I've switched my memo fields to strings to avoid this I just thought I'd let others know.

Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Dynamic fields
« Reply #4 on: June 29, 2009, 12:39:39 AM »
If the file is not open, then you're not allowed to use MEMO or BLOB fields, and if you do the program will crash.

Since you've not opened the file in the example you sent, I expect this is the reason for it. (In the Validate routines the files are not necessarily open).

Cheers
Bruce