Hi Quickbase Community,
I am having an issue using a switch statement in Javascript while adding a record. I have defined a variable in the URL button called F9 that provides the number of site visits, the code runs perfectly without the switch statement - can someone please let me know if I am doing something wrong and how i can correct it? (there are 10 visits, i have just shortened for testing)
$.get(dbidWR, {
act: "API_AddRecord",
_fid_48: F72,
_fid_132: F77,
_fid_150: F98,
_fid_147: F84,
_fid_77: F100,
switch(F9){
case '1':
_fid_137: F21;
_fid_251: F22;
_fid_442: F23;
_fid_164: F999;
break;
case '2':
_fid_137: F21;
_fid_251: F22;
_fid_442: F23;
_fid_164: F999;
_fid_138: F25;
_fid_252: F26;
_fid_443: F27;
_fid_165: F999;
break;
}
Sign up
Already have an account? Login
Login to the community
Login with Quickbase US – quickbase.com Login with Quickbase EU – quickbase.eu
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.