NetTalk Central

Author Topic: Force a wizard to always start with the first tab - how? - SOLVED  (Read 2754 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Tab management in a form wizard remains a mystery to me  ;)

When a new user logs into my app for the first time I show a form wizard to collect various setup info. If the user cancels the wizard before completed, he gets logged out.

Problem is if/when the user logs in again, the wizard "remembers" the tab he was on when cancelling. I want the wizard to start from "the beginning" but I can't figure out how. I've tried setting loc:tabnumber = 0 in various embeds but to no avail.

Peter

Update: As it often happens, describing a problem points you to the solution. When thinking about the above problem I realized that it had to be related to the session and had nothing to do with the tab management as such. So simply deleting the session when the user cancels out led to the desired behaviour..
Thanks for reading
  ;)
Peter
« Last Edit: October 06, 2016, 06:09:06 AM by peterH »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: Force a wizard to always start with the first tab - how? - SOLVED
« Reply #1 on: October 11, 2016, 11:55:04 PM »
Hi Peter,

thanks for the update, although there is a simpler solution - especially for the case where deleting the wholw session is not an option <g>.

the value is stored in
showtab_UpdateInvoices
where UpdateInvoices is the name of the form.

So you can reset it to the first tab (Tab 0) by doing
p_web.SSV('showtab_UpdateInvoices',0)

Cheers
Bruce

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Force a wizard to always start with the first tab - how? - SOLVED
« Reply #2 on: October 12, 2016, 01:27:51 AM »
Hi Bruce,

Thanks for your update, that was very useful!!!

I had of course been digging around in the generated code, but I kind of fooled myself. My procedure in question is called FirstTime and when seing that in the code it didn't ring a bell - I thought it was some internal name used by the template/class. Now I'm a bit embaressed  :-[ - but I've learned something  ;)

Peter

jslarve

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Re: Force a wizard to always start with the first tab - how? - SOLVED
« Reply #3 on: October 12, 2016, 08:21:35 PM »
Well, I wasted a couple of hours yesterday trying to figure out why one proc couldn't see the other's session value. But I was using SetValue instead of SSV. :)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: Force a wizard to always start with the first tab - how? - SOLVED
« Reply #4 on: October 12, 2016, 11:36:13 PM »
yeah, a name like Firsttime could definitely be confusing!