NetTalk Central

Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Web Server - Ask For Help / Re: Partial Save?
« Last post by rjolda on May 26, 2024, 12:38:09 PM »
Johan,
I constantly get stuck with this - Bruce keeps correcting me.  So here is it.  There is NO FORM!  It does NOT EXIST!.  So, when user is on "Same FORM" - that really does NOT MEAN ANYTHING!. 
Bruce said "Think of the Form as a series of EVENTS" - User sends a Request EVENT to server and Server Responds.  Then the connection is CLOSED.  If you open a form, THe record is read into SESSION variables and the Record itself is GONE!.  So,  Everything you do is an EVENT.  Because the SESSION ID is passed back and forth between the User ( Browser ) and Server, the SERVER VALUES are always accessible by SessionID - the record itself is NOT available. At the End of the form - when you press SAVE or DONE - the Server is instructed to fetch the record and update it with the ServerValues for that session ID.  Does that make sense?
I am doing some things like your user.  I am pulling out a record and putting some settings in it.  Then the user ( still on the same MemForm) is pressing buttons to do different actions.  For each of these actions, I have to take their new values, Stuff them into the Session Values, fetch the record and write them to the record itself. 
In other words, the Session Values are the thing that the user is interacting with ( as a representation of the record itself..).  Therefore if you are going to do a partial save, Update the Session variables.  At this point I am going to fetch the record and write the values directly to the record and update it without using the p_web.recordtovalue and p_web.Values to Record functions.  (Not sure that these are the correct names but they are in the p_web settings.  i will keep the Session values updated as they are the "representative state" of the "record".   At the end, I could to a values to record save but I might just roll my own and update the fields that i want.
Since the Updates to the record are under YOUR CONTROL in the EMBEDS  - you can check to make sure that your data got written to the record with the
If not Access:File.Update() = Level:Benign
  then ALERT USER.
You can also use the Access:File.tryUpdate() function.
Hope that this explanation helps you.
Ron
12
Web Server - Ask For Help / Partial Save - Success or Fail?
« Last post by JohanR on May 26, 2024, 12:18:49 PM »
Hi,

How would I know if the partial save was a success or failed?

thanks

Johan


13
Web Server - Ask For Help / Re: Partial Save? (extra info)
« Last post by JohanR on May 25, 2024, 06:50:00 AM »
Hi,

Further info , this works if the field you're changing is on the page.

   ord:special_instructions = 'Partial save2222'
   p_web.SetValue('ord:special_instructions',ord:special_instructions)

if the field that your changing is not on the page, then you have to set the session variable as well.

   ord:special_instructions = 'Partial save2222'
   p_web.SSV('ord:special_instructions',ord:special_instructions)
   p_web.SetValue('ord:special_instructions',ord:special_instructions)

regards

Johan

14
Web Server - Ask For Help / Re: Partial Save?
« Last post by JohanR on May 25, 2024, 06:33:15 AM »
Hi Ron

Thanks,
but am using buttons on the form to save the form but leave it open, or if it was inserted will save and convert to a change record situation.
Very useful.

eg.
User is doing a quote in insert mode, and if he's happy , converts the quote to a confirmed order.
This way the user can confirm, and keep editing and update the other required information without leaving the page, name, address etc..but the order has been confirmed and saved.
Or he decides to add to to next the despatch , and don't want that add to happen with a record that is in insert mode.


regards

Johan



15
Web Server - Ask For Help / Re: Partial Save?
« Last post by rjolda on May 25, 2024, 02:16:17 AM »
Johan,
What are you working with - a Form or MemForm?
There are several methods available for Before writing to file and after writing to file.  Make sure your code is in the Before writing to file.
Ron
16
Web Server - Ask For Help / Re: Old wizard
« Last post by osquiabro on May 24, 2024, 06:57:06 AM »
by the way the login wizard generate LevelBenign without :
17
Web Server - Ask For Help / Re: GUID Question
« Last post by rjolda on May 24, 2024, 04:18:38 AM »
Hi,
16 characters - each can have up to 36 choices ( Upper case alphabet) gives you 2.2300745198530623141535718272648e+43  unique values.  Do you need more than that?
If you do, then you can go to 32 characters and you will get 1.5324955408658888583583470271503e+54  values.  You can choose.  Bruce recommends 16 characters but you can zone in on your own comfort zone!
Ron
18
Web Server - Ask For Help / GUID Question
« Last post by rupertvz on May 24, 2024, 02:54:50 AM »
Hi Guys,

All my GUID's are 16 characters, and relations between my tables are all GUID based lately.

A .Net developer told me that the GUID should ideally be 32 characters.

Does this mean moving forward it is best to cater for 32 bit GUID's in my tables, or will 16 characters suffice for the foreseeable future.

I did a bit of reading up on this, but would like to hear any comments.
19
Web Server - Ask For Help / File Upload button on MemForm
« Last post by jking on May 23, 2024, 04:12:36 PM »
Hi Bruce,

     I'm trying to use a MemForm, with a single FileUpload button on it, to upload files to the web\uploads folder.  The web log does show the POST /dataupload event but the actual file is not in the uploads folder.  I have tried this running a local exe and also from a server using a dll with the multi-site host.

     I have run the example app, which uses a normal NetWebForm, and the file does get uploaded properly.  Is it possible it won't work with a MemForm?

Thanks,

Jeff King
20
Web Server - Ask For Help / Partial Save?
« Last post by JohanR on May 22, 2024, 12:40:33 AM »
Hi,

If I want to update other fields in the record, how and where do I set them using a partial save button?
Do I set the session variables, the actual record fields or how?

Have tried, but for some reason the data is not being written to disk,
the partial save works, and it saves the fields from the page, but not the ones I set in the embed.
I did move the code to the embed before the save code. 

thanks

Johan

Pages: 1 [2] 3 4 ... 10