VBScript Code Development - Build Array variable from db values

Completed Posted 3 months ago Paid on delivery
Completed 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

VBScript Scripting

Project ID: #38658692

About the project

4 proposals Remote project Active 3 mos ago

Awarded to:

vano101

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

$18 USD in 1 day
(20 Reviews)
4.2

4 freelancers are bidding on average $25 for this job

AnaC0899

Hello, Scripting is my primary skill and have built a lot of applications as a senior developer in remote teams. And I have experience with Array processing as a backend developer. I'm a new user on here so I'll do my More

$20 USD in 7 days
(0 Reviews)
0.0