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');
Syntax problem on IF Statement
-
- New User
- Posts: 2
- Joined: Fri Sep 11, 2015 10:25 am
- First Name: Gordon
- Last Name: Leary
- Company Name: AMPORTS
- Phone: 410-843-7110
- Address 1: 2901 Childs St
- City: Baltimore
- State / Province: Maryland
- Zip / Postal Code: 21226
- Country: United States
- Contact:
- Glenn
- Profound Logic Staff Member
- Posts: 124
- Joined: Mon Apr 14, 2014 4:08 pm
- First Name: Glenn
- Last Name: Hopwood
- Company Name: Profound Logic Software
- State / Province: Ohio
- Country: United States
- Contact:
Re: Syntax problem on IF Statement
JavaScript is case sensitive. Your "IF" statement needs to be "if". The JavaScript interpreter would probably see "IF ()" as a call to a function named "IF".
Glenn
Glenn
-
- New User
- Posts: 2
- Joined: Fri Sep 11, 2015 10:25 am
- First Name: Gordon
- Last Name: Leary
- Company Name: AMPORTS
- Phone: 410-843-7110
- Address 1: 2901 Childs St
- City: Baltimore
- State / Province: Maryland
- Zip / Postal Code: 21226
- Country: United States
- Contact:
Re: Syntax problem on IF Statement
Thank you Glenn. I was going to try that too, and got side tracked. I knew it was an easy one.
Who is online
Users browsing this forum: No registered users and 4 guests