NetTalk Central

Author Topic: how to call change mode form where PK value is stored in SessionValue queue ?  (Read 4367 times)

kashiash

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
i try put code like into init form routine at begining:
       if Access:WyliczenieSkladki.Fetch(Wyl:KeyKalkulacjaNrKolejny)
          ! todo przejscie do forma z bledem
           db.debugout('nie znalazlem kalkulacji nr '&p_web.GetSessionValue('PropozycjaSkladki')&' dla: ' & p_web.GetSessionValue('Kalkulacja') )
       else   
          db.debugout('pobrana sk?adka kalkulacji to: '&Wyl:PkWyliczenieSkladki & 'skladka:' &  Wyl:Skladka & ' opis: ' & Wyl:OpisUbezpieczenia)
          p_web.SetValue('Wyl:PkWyliczenieSkladki',Wyl:PkWyliczenieSkladki)
                p_web.SetSessionValue('Wyl:PkWyliczenieSkladki',Wyl:PkWyliczenieSkladki)

I observe in debugview i fetch correct value but on form i get few data from previous record, whta's wrong ?

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
It would be great if you could post an example app.

kashiash

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
its app based on sql and its not easy to make example app, i try to port this into tps and will send here

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Even better if you modify one of the examples to show what you are trying to do - I'm sure it is just maybe the embed you are using or GSV values not being cleared etc.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
You're not supposed to load the record in InitForm. It just doesn't work like that.

So perhaps you need to describe what it is you're really trying to do?

Cheers
Bruce



kashiash

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
i want to edit record in form, but i dont know PK for edited record, i know values (stored in SV queue) for second unique index and after open form i try to fetch this record using second index and allow to user to edit data