NetTalk Central

Author Topic: Priming fields on NetwebForm on Insert  (Read 2825 times)

johanl

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Email
Priming fields on NetwebForm on Insert
« on: April 15, 2012, 08:41:16 PM »
Hello

I need to prime a field on a NetwebForm, when I insert a record I want to display on the form a text field setup in the database but no matter what I do i cannot get it to work. The following code is embedded in the Preinsert embed point if the form:

    Access:WebTextSettings.Open()
    Access:WebTextSettings.UseFile()

    WEBTS:WebTextSettingNo = 1
    Access:WebTextSettings.Fetch(WEBTS:WebTextSetting_PK)
   
    PRE:PreRegistrationText = WEBTS:PreRegistrationText
   
    Access:WebTextSettings.Close()

If I use field priming with dummy text it works but above code no luck

Any suggestions?

Regards



kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Priming fields on NetwebForm on Insert
« Reply #1 on: April 15, 2012, 09:39:18 PM »
Add a trace on PRE:PreRegistrationText after it is primed. If it is the correct value then it must be getting updated somewhere else. In that case look at the full source what is happening after this embed as well as searching on PRE:PreRegistrationText to see where it gets used. If its not the right value then something is amiss with your fetch.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Priming fields on NetwebForm on Insert
« Reply #2 on: April 15, 2012, 10:39:14 PM »
add another line;
p_web.SSV('PRE:PreRegistrationText',PRE:PreRegistrationText)

cheers
Bruce