Syntax problem on IF Statement
Posted: Thu Feb 16, 2017 10:16 am
I am getting a red "X" stating a missing semicolon on my IF statements. This is on a ONROWCLICK. If I put the semicolon as
IF (Brand == "VW"); {CC = '55VW';}
It is happy, but does not work because of the missing condition. Been staring and trying on this one way to long. Below is the code as I expect it to work.
pui.set("S_VIN", getObj("Grid1").grid.getCellValue(row, 6));
pui.set("Brand", getObj("Grid1").grid.getCellValue(row, 0));
IF (Brand == "VW") {CC = '55VW';}
IF (Brand == "Audi") {CC = '55AU';}
IF (Brand == "Bentley") {CC = '55BM';}
VINp = get("S_VIN");
CoClVINp = CC + VINp;
Atrium.launchURL('/profoundui/auth/start?atrium_item=219&p1='+CoClVINp+'&l1=21', 'VIN Inquiry');
IF (Brand == "VW"); {CC = '55VW';}
It is happy, but does not work because of the missing condition. Been staring and trying on this one way to long. Below is the code as I expect it to work.
pui.set("S_VIN", getObj("Grid1").grid.getCellValue(row, 6));
pui.set("Brand", getObj("Grid1").grid.getCellValue(row, 0));
IF (Brand == "VW") {CC = '55VW';}
IF (Brand == "Audi") {CC = '55AU';}
IF (Brand == "Bentley") {CC = '55BM';}
VINp = get("S_VIN");
CoClVINp = CC + VINp;
Atrium.launchURL('/profoundui/auth/start?atrium_item=219&p1='+CoClVINp+'&l1=21', 'VIN Inquiry');