VBScript Code Development - Build Array variable from db values
$10-30 USD
Paid on delivery
Generate VBScript code to create an array of values based on "boolean" flags stored in 6 columns in a database. "Boolean" flags will be 0 (NO) or 1 (YES). If one of the column values is "1", it's corresponding name will be added to the array. If the value of the column is "0" (zero) the value will not be added to the array. The array should be semicolon (;) delimited. We only need the code built so we can insert it into our program.
Here are the 6 columns that should be checked:
"GHS Skull & Crossbones"
"GHS Dead Tree & Fish"
"GHS Health Hazard"
"GHS Oxidizers"
"GHS Exclamation"
"GHS Explosion"
The values that should be written to the array for each column (if the value is "1") are:
[login to view URL] ("GHS Skull & Crossbones")
[login to view URL] ("GHS Dead Tree & Fish")
[login to view URL] ("GHS Health Hazard")
[login to view URL] ("GHS Oxidizers")
[login to view URL] ("GHS Exclamation")
[login to view URL] ("GHS Explosion")
Example 1:
"GHS Skull & Crossbones" = 1
"GHS Dead Tree & Fish" = 0
"GHS Health Hazard" = 0
"GHS Oxidizers" = 1
"GHS Exclamation" = 1
"GHS Explosion" = 0
RESULTING ARRAY FOR EXAMPLE 1: [login to view URL];[login to view URL];[login to view URL]
Example 2:
"GHS Skull & Crossbones" = 0
"GHS Dead Tree & Fish" = 0
"GHS Health Hazard" = 1
"GHS Oxidizers" = 1
"GHS Exclamation" = 0
"GHS Explosion" = 0
RESULTING ARRAY FOR EXAMPLE 1: [login to view URL];[login to view URL]
Psuedo code example:
if [login to view URL]("GHS Health Hazard").Value = 1 THEN
Add [login to view URL] to Array
End If
if [login to view URL]("GHS Oxidizers").Value = 1 THEN
Add [login to view URL] to Array
End If
Project ID: #38658692
About the project
Awarded to:
Hello I have over 14 years of experience with Visual Basic and VBScript scripting it;s easy task I can complete in 1-2 hours of working time