Page 1 of 1

Tab Panel Help

Posted: Tue Oct 28, 2008 8:52 pm
by warrenk
I have a panel with a 3 tabs on a card. I want to load the value of the fields from the 3 tabs into variables. How do I do this with panels.

ie.
put field "Contact 1" from "tab 1" of "Panel 1" into tVariable1
put field "Contact 2" from "tab 2" of "Panel 1" into tVariable2

I know the put commands above are incorrect...but I figured it would help to define what I was trying to do.

Thanks!
Warren

Posted: Tue Oct 28, 2008 10:46 pm
by Mark
Hi Warren,

It is not clear to me what the problem is. To put the text of a field into a variable, just do this

Code: Select all

put fld 1 into myVar
If you want to do this depending on the tab, perhaps a switch control structure is useful:

Code: Select all

on menuPick theTab
  switch theTab
    case "Tab One"
      put fld "Tab One" into myTabOneVar
      break
   case "Tab Two"
      put fld "Tab Two" into myTabTwoVar
     break
   case "Tab Three"
      put fld "Tab Three" into myTabThreeVar
     break
   end switch
end menuPick
Best,

Mark

Posted: Wed Oct 29, 2008 2:51 am
by warrenk
Mark,

Thanks for the explanation. I think I was trying to use the panel incorrectly.

Warren