S
Shelly
I have code where I get a string value from a file which contains the
State Abbreviation and compare it for state specific programming.
When it wasn't falling through the correct code, I put statements in to
prompt and tell me what was coming back in that field before it hit the
condition. The weird thing is, is that it is correct (no extra
spaces--nothing), but it doesn't like it. For further troubleshooting
purposes I set the field to what I wanted right before the condition
and then it works. The way I'm filling the state abbreviation string
(via a cell in an Excel Spreadsheet) is being used throughout the
program for other variable strings as well and is working just fine.
Here is the code...
***********************************************************************
** The ini.stateAbbr when checked here is WI no spaces or extra chars *
** But it goes to the "else" of this first condition. *
** Even if you can tell me other things to check would be great *
** because I'm looking at brick wall here. *
***********************************************************************
if (ini.stateAbbr == "WI") {
if (groupToPrint.masterNumber == "0") {
usablePath = groupToPrint.eMailAddress.trim()
+ " "
+ groupToPrint.stringGrNo
+ groupToPrint.masterNumber
+ groupToPrint.locNumber
+ groupToPrint.subNumber
+ groupToPrint.poolNumber
+ " "
+ groupToPrint.descriptiveName
+ theDate
+ theTime;
} else {
usablePath = groupToPrint.eMailAddress.trim()
+ " "
+ groupToPrint.masterNumber
+ groupToPrint.stringGrNo
+ groupToPrint.locNumber
+ groupToPrint.subNumber
+ groupToPrint.poolNumber
+ " "
+ groupToPrint.descriptiveName
+ theDate
+ theTime;
}
} else {
if (groupToPrint.masterNumber == "0") {
usablePath = groupToPrint.stringGrNo
+ groupToPrint.masterNumber
+ groupToPrint.locNumber
+ groupToPrint.subNumber
+ groupToPrint.poolNumber
+ groupToPrint.timePeriod
+ groupToPrint.descriptiveName
+ theDate
+ theTime;
} else {
usablePath = groupToPrint.masterNumber
+ groupToPrint.stringGrNo
+ groupToPrint.locNumber
+ groupToPrint.subNumber
+ groupToPrint.poolNumber
+ groupToPrint.timePeriod
+ groupToPrint.descriptiveName
+ theDate
+ theTime;
}
}
State Abbreviation and compare it for state specific programming.
When it wasn't falling through the correct code, I put statements in to
prompt and tell me what was coming back in that field before it hit the
condition. The weird thing is, is that it is correct (no extra
spaces--nothing), but it doesn't like it. For further troubleshooting
purposes I set the field to what I wanted right before the condition
and then it works. The way I'm filling the state abbreviation string
(via a cell in an Excel Spreadsheet) is being used throughout the
program for other variable strings as well and is working just fine.
Here is the code...
***********************************************************************
** The ini.stateAbbr when checked here is WI no spaces or extra chars *
** But it goes to the "else" of this first condition. *
** Even if you can tell me other things to check would be great *
** because I'm looking at brick wall here. *
***********************************************************************
if (ini.stateAbbr == "WI") {
if (groupToPrint.masterNumber == "0") {
usablePath = groupToPrint.eMailAddress.trim()
+ " "
+ groupToPrint.stringGrNo
+ groupToPrint.masterNumber
+ groupToPrint.locNumber
+ groupToPrint.subNumber
+ groupToPrint.poolNumber
+ " "
+ groupToPrint.descriptiveName
+ theDate
+ theTime;
} else {
usablePath = groupToPrint.eMailAddress.trim()
+ " "
+ groupToPrint.masterNumber
+ groupToPrint.stringGrNo
+ groupToPrint.locNumber
+ groupToPrint.subNumber
+ groupToPrint.poolNumber
+ " "
+ groupToPrint.descriptiveName
+ theDate
+ theTime;
}
} else {
if (groupToPrint.masterNumber == "0") {
usablePath = groupToPrint.stringGrNo
+ groupToPrint.masterNumber
+ groupToPrint.locNumber
+ groupToPrint.subNumber
+ groupToPrint.poolNumber
+ groupToPrint.timePeriod
+ groupToPrint.descriptiveName
+ theDate
+ theTime;
} else {
usablePath = groupToPrint.masterNumber
+ groupToPrint.stringGrNo
+ groupToPrint.locNumber
+ groupToPrint.subNumber
+ groupToPrint.poolNumber
+ groupToPrint.timePeriod
+ groupToPrint.descriptiveName
+ theDate
+ theTime;
}
}